[#PKCS12_key_gen_uni_ex] = PKCS12_key_gen_uni_ex :mrdocs: Derive key material using the PKCS#12 key‐generation function (BMPString passphrase). == Synopsis Declared in `<openssl/pkcs12.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PKCS12_key_gen_uni_ex( unsigned char* pass, int passlen, unsigned char* salt, int saltlen, int id, int iter, int n, unsigned char* out, xref:EVP_MD.adoc[EVP_MD] const* md_type, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* ctx, char const* propq); ---- == Return Value 1 on success, 0 on error. == Parameters [cols="1,4"] |=== | Name| Description | *pass* | Unicode passphrase (big‐endian UTF‐16, not NUL‐terminated). | *passlen* | Length of `pass` in bytes. | *salt* | Salt for derivation. | *saltlen* | Length of `salt` in bytes. | *id* | Purpose byte (PKCS12_KEY_ID, PKCS12_IV_ID, or PKCS12_MAC_ID). | *iter* | Iteration count (values less than 1 are treated as 1). | *n* | Number of bytes to derive. | *out* | Buffer to receive derived key material. | *md_type* | Message digest for the derivation. | *ctx* | Library context for algorithm fetching, or NULL for default. | *propq* | Property query for algorithm fetching, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#