[#PKCS5_pbe_set0_algor]
= PKCS5&lowbar;pbe&lowbar;set0&lowbar;algor
:mrdocs:

Set a PKCS&num;5 PBE algorithm OID and parameters into an existing X509&lowbar;ALGOR&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS5&lowbar;pbe&lowbar;set0&lowbar;algor(
    xref:X509_ALGOR.adoc[X509&lowbar;ALGOR]* algor,
    int alg,
    int iter,
    unsigned char const* salt,
    int saltlen);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *algor*
| AlgorithmIdentifier to update in place&period;
| *alg*
| PBE algorithm NID (for example NID&lowbar;pbeWithMD5AndDES&lowbar;CBC)&period;
| *iter*
| PBKDF iteration count&period;
| *salt*
| Optional salt bytes, or NULL to generate `saltlen` random bytes (0 uses a default length)&period;
| *saltlen*
| Salt length in bytes, or size to generate when `salt` is NULL&period;
|===


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