.TH "libnvmf_gen_kxchap_key" 9 "libnvmf_gen_kxchap_key" "October 2026" "libnvme API manual" LINUX .SH NAME libnvmf_gen_kxchap_key \- KX-HMAC-CHAP key generation .SH SYNOPSIS .B "int" libnvmf_gen_kxchap_key .BI "(struct libnvme_global_ctx *ctx " "," .BI "char *hostnqn " "," .BI "enum libnvmf_hmac_alg hmac " "," .BI "unsigned int key_len " "," .BI "unsigned char *secret " "," .BI "unsigned char *key " ");" .SH ARGUMENTS .IP "ctx" 12 struct libnvme_global_ctx object .IP "hostnqn" 12 Host NVMe Qualified Name .IP "hmac" 12 HMAC algorithm .IP "key_len" 12 Output key length .IP "secret" 12 Secret to used for digest .IP "key" 12 Generated KX-HMAC-CHAP key .SH "RETURN" If key generation was successful the function returns 0 or a negative error code otherwise.