[#PKCS5_v2_PBE_keyivgen_ex] = PKCS5_v2_PBE_keyivgen_ex :mrdocs: Derive a key and IV with PKCS#5 PBES2 and initialize `ctx` for encrypt/decrypt. == Synopsis Declared in `<openssl/evp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PKCS5_v2_PBE_keyivgen_ex( xref:EVP_CIPHER_CTX.adoc[EVP_CIPHER_CTX]* ctx, char const* pass, int passlen, xref:ASN1_TYPE.adoc[ASN1_TYPE]* param, xref:EVP_CIPHER-07.adoc[EVP_CIPHER] const* cipher, xref:EVP_MD.adoc[EVP_MD] const* md, int en_de, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* libctx, char const* propq); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | Cipher context to initialize. | *pass* | Password bytes, or NULL. | *passlen* | Length of `pass` in bytes, or ‐1 to use strlen(`pass).` | *param* | ASN.1 PBES2 parameters describing KDF and cipher settings. | *cipher* | Cipher algorithm to initialize (may be taken from `param).` | *md* | Digest used by the KDF when required by the parameters. | *en_de* | 1 to encrypt, or 0 to decrypt. | *libctx* | Library context for algorithm fetches, or NULL for the default. | *propq* | Property query string for provider selection, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#