zfs.resource.encryption.change_key ================================== Change the key or passphrase of an unlocked encryption root. A new hex key is stored by the system. Switching to a passphrase is refused when an encryption root below ``path`` uses a hex key, or when ``path`` is a pool holding the system dataset. Switching to a hex key is refused when a parent is encrypted with a passphrase. Example: .. code:: json {"path": "tank/secure", "generate_key": true} This method is a job. *This job CAN be used with file upload.* See :ref:`uploading-files`. .. raw:: html
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: data

data

Type: object

Change key parameters.

No Additional Properties

Path

Type: string

Path of the unlocked encryption root whose key is changed.

Must be at least 1 characters long

Generate Key

Type: boolean Default: false

Generate a new random 64-character hex key.

Key File

Type: boolean Default: false

Read a 64-character hex key from the input pipe.

Pbkdf2Iters

Type: integer Default: 1300000

Number of PBKDF2 iterations for key derivation from the passphrase. Only meaningful together with passphrase. Higher values improve resistance to brute force attacks but increase unlock time.

Value must be greater or equal to 1300000

Passphrase

Default: null

A new passphrase of 8 to 512 characters. Passphrases are never stored by the system.

Type: string

Must be at least 8 characters long

Must be at most 512 characters long

Type: null

Key

Default: null

A new key of exactly 64 hexadecimal characters.

Type: string
Must match regular expression: ^[0-9a-fA-F]{64}$
Type: null

Result

Type: null

Returns null once the key is changed.



*Required roles:* ZFS_RESOURCE_WRITE