luks_add_key
Description:
[ Version ( since = "1.5.2" ) ]
public bool luks_add_key (string device, string key, string newkey, int32 keyslot) throws Error
public bool luks_add_key (string device, string key, string newkey, int32 keyslot) throws Error
add a key on a LUKS encrypted device
This command adds a new key on LUKS device device
. key
is any existing key, and is used to access the device.
newkey
is the new key to add. keyslot
is the key slot that will be replaced.
Note that if keyslot
already contains a key, then this command will fail. You have to use
luks_kill_slot first to remove that key.
This function depends on the feature "luks". See also feature_available.
Parameters:
this |
A GuestfsSession object |
Returns:
true on success, false on error |