[#PKCS5_pbe_set_ex]
= PKCS5&lowbar;pbe&lowbar;set&lowbar;ex
:mrdocs:

Build a PKCS&num;5 PBE AlgorithmIdentifier using an explicit library context&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;pbe&lowbar;set&lowbar;ex(
    int alg,
    int iter,
    unsigned char const* salt,
    int saltlen,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx);
----

== Return Value

New X509&lowbar;ALGOR, or NULL on error&semi; free with X509&lowbar;ALGOR&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *alg*
| PBE algorithm NID&period;
| *iter*
| Iteration count&period;
| *salt*
| Salt bytes, or NULL to generate a random salt of `saltlen&period;`
| *saltlen*
| Salt length in bytes&period;
| *libctx*
| Library context used when generating a random salt, or NULL for the default&period;
|===


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