k2hdkcpx_add_subkey
Adds a new subkey to a key
Description
/**
* @param resource $handle_res
*/
function k2hdkcpx_add_subkey(
$handle_res,
string $key,
string $subkey,
string $subval,
bool $check_attr = true,
string $password = null,
int $expiration_duration = 0): bool {}
Associates the key with the other key. The key that is added to the other key is called ‘subkey’. The key that adds the other key to is ‘parent key’. A parent key can associates many subkeys.
Parameters
- handle_res
Specify the chmpx handle thatk2hdkcpx_open
returns. - key
Specify the key. - subkey
Specify the subkey that is associated with the key. - subval
Specify the subval that is associated with the subkey. - check_attr
Specifytrue
to check the passphrase and expiration of the parent key. - password
Specify the passphrase for encrypting the value. - expiration_duration
Specify the expiration duration in seconds.
Return Values
Returns true
on success or false
on failure.
See Also
- K2hdkc::addSubkey - Associates the key with the other key