LIBNVMF_IMPORT_TLS_KEY_VERSIONED-LIBNVME3(2)
π libnvmf_import_tls_key_versioned(2) π
okay so this is from the libnvme API manual, and bestie, it's literally just one function that turns a fancy encoded PSK string back into the actual raw key. no cap, that's the whole vibe.
πΈ NAME πΈ
libnvmf_import_tls_key_versioned β decodes a PSK from the PSK interchange format β¨
π SYNOPSIS π
int libnvmf_import_tls_key_versioned (struct libnvme_global_ctx *ctx ,
const char *encoded_key , unsigned char *version , enum libnvmf_hmac_alg
*hmac , size_t *key_len , unsigned char **key );
π¦ ARGUMENTS π¦
ctxβ thestruct libnvme_global_ctxobject, your main character context, iykyk π«Άencoded_keyβ the PSK in PSK interchange format, aka the glow-up version of the keyversionβ the version of the PSK interchange format read fromencoded_key, handed back to you. it's always1; literally any other value gets rejected with-EINVALπhmacβ the hash function recorded inencoded_key, returned to you; it derives a retained PSK from a configured PSK π§key_lenβ the length of the decoded PSK, returnedkeyβ the decoded PSK itself, returned π
β¨ DESCRIPTION β¨
So it decodes encoded_key from the PSK Interchange format, as defined in section 3.6.1.5 of the NVMe TCP Transport Specification 1.3. iconic spec reference, we love a citation π
π¨ important bestie: it is the responsibility of the caller to free the returned buffer. that memory is yours now, don't just abandon it π
π RETURN π
0 on success, negative error code otherwise. slay π
k bye, this page was brought to you by the libnvme source, dated October 2026 β go decode some keys, mwah ππ
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms