.TH "libnvmf_export_tls_key" 9 "libnvmf_export_tls_key" "October 2026" "libnvme API manual" LINUX .SH NAME libnvmf_export_tls_key \- Encode a PSK in the PSK interchange format .SH SYNOPSIS .B "int" libnvmf_export_tls_key .BI "(struct libnvme_global_ctx *ctx " "," .BI "const unsigned char *key_data " "," .BI "int key_len " "," .BI "char **encoded_keyp " ");" .SH ARGUMENTS .IP "ctx" 12 struct libnvme_global_ctx object .IP "key_data" 12 Raw PSK data .IP "key_len" 12 Length of \fIkey_data\fP .IP "encoded_keyp" 12 Encoded PSK to return .SH "DESCRIPTION" Returns \fIkey_data\fP in the PSK Interchange format as defined in section 3.6.1.5 of the NVMe TCP Transport Specification 1.3. It is the responsibility of the caller to free the returned string. .SH "RETURN" 0 on success, negative error code otherwise.