# nvmet.host.generate_key

Generate a secret key that may be used when configuring host authentication.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: dhchap_hash

#### dhchap_hash

Type: enum (of string) Default: "SHA-256"

Hash to be used with the generated key.

##### Must be one of:

- "SHA-256"
- "SHA-384"
- "SHA-512"

##### Parameter 2: nqn

#### nqn

Default: null

NQN to be used for the transformation.

## Any of

Type: string
Type: null

##

#### Result

Type: string

Generated DH-CHAP key for NVMe-oF authentication.

Required roles: SHARING_NVME_TARGET_WRITE