[#PKCS5_pbkdf2_set_ex]
= PKCS5&lowbar;pbkdf2&lowbar;set&lowbar;ex
:mrdocs:

Build an X509&lowbar;ALGOR describing PBKDF2 parameters (library&hyphen;context aware)&period;

== Synopsis

Declared in `&lt;openssl&sol;x509&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:X509_ALGOR.adoc[X509&lowbar;ALGOR]*
PKCS5&lowbar;pbkdf2&lowbar;set&lowbar;ex(
    int iter,
    unsigned char* salt,
    int saltlen,
    int prf&lowbar;nid,
    int keylen,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx);
----

== Return Value

New X509&lowbar;ALGOR on success, or NULL on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *iter*
| PBKDF2 iteration count&period;
| *salt*
| Salt octets&semi; may be NULL to generate a random salt of `saltlen&period;`
| *saltlen*
| Salt length in bytes&period;
| *prf&lowbar;nid*
| NID of the PRF digest (for example NID&lowbar;hmacWithSHA256)&semi; &lt;&equals; 0 selects the default&period;
| *keylen*
| Derived key length in bytes to encode in the parameters&semi; &lt;&equals; 0 omits it&period;
| *libctx*
| Library context used for any random salt generation&semi; NULL uses the default&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
