libnvmf_gen_kxchap_key(9) libnvme API manual libnvmf_gen_kxchap_key(9)

libnvmf_gen_kxchap_key - KX-HMAC-CHAP key generation

int libnvmf_gen_kxchap_key (struct libnvme_global_ctx *ctx , char *hostnqn , enum libnvmf_hmac_alg hmac , unsigned int key_len , unsigned char *secret , unsigned char *key );

struct libnvme_global_ctx object
Host NVMe Qualified Name
HMAC algorithm
Output key length
Secret to used for digest
Generated KX-HMAC-CHAP key

If key generation was successful the function returns 0 or a negative error code otherwise.

libnvmf_gen_kxchap_key October 2026