.TH "libnvmf_read_key" 9 "libnvmf_read_key" "October 2026" "libnvme API manual" LINUX .SH NAME libnvmf_read_key \- Read key raw data .SH SYNOPSIS .B "int" libnvmf_read_key .BI "(struct libnvme_global_ctx *ctx " "," .BI "long keyring_id " "," .BI "long key_id " "," .BI "int *len " "," .BI "unsigned char **key " ");" .SH ARGUMENTS .IP "ctx" 12 struct libnvme_global_ctx object .IP "keyring_id" 12 Id of the keyring holding \fIkey_id\fP .IP "key_id" 12 Key id .IP "len" 12 Length of \fIkey\fP to return .IP "key" 12 Raw key data to return .SH "DESCRIPTION" Links the keyring specified by \fIkeyring_id\fP into the session keyring and reads the payload of the key specified by \fIkey_id\fP. \fIlen\fP holds the size of the returned buffer. If \fIkeyring_id\fP is 0 the default keyring '.nvme' is used. .SH "RETURN" 0 on success, negative error code otherwise.