[#PKCS5_pbe2_set] = PKCS5_pbe2_set :mrdocs: Build a PKCS#5 PBES2 AlgorithmIdentifier for `cipher` with PBKDF2. == Synopsis Declared in `<openssl/x509.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:X509_ALGOR.adoc[X509_ALGOR]* PKCS5_pbe2_set( xref:EVP_CIPHER-07.adoc[EVP_CIPHER] const* cipher, int iter, unsigned char* salt, int saltlen); ---- == Return Value New X509_ALGOR encoding PBES2 parameters, or NULL on error; free with X509_ALGOR_free(). == Parameters [cols="1,4"] |=== | Name| Description | *cipher* | Content‐encryption cipher for the PBES2 encryption scheme. | *iter* | PBKDF2 iteration count; <=0 selects the default. | *salt* | Optional salt bytes; NULL generates a random salt of `saltlen` (default 16 if 0). | *saltlen* | Salt length in bytes when `salt` is NULL / length of `salt.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#