[#EVP_PBE_KEYGEN]
= EVP&lowbar;PBE&lowbar;KEYGEN
:mrdocs:

Callback type that derives a key&sol;IV from a password and initializes a cipher context for PBE&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
typedef int EVP&lowbar;PBE&lowbar;KEYGEN(xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]*, char const*, int, xref:ASN1_TYPE.adoc[ASN1&lowbar;TYPE]*, xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const*, xref:EVP_MD.adoc[EVP&lowbar;MD] const*, int);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Cipher context to initialize for encryption or decryption&period;
| *pass*
| Password bytes (not necessarily NUL&hyphen;terminated)&period;
| *passlen*
| Length of `pass` in bytes, or &hyphen;1 if `pass` is NUL&hyphen;terminated&period;
| *param*
| Algorithm&hyphen;specific ASN&period;1 parameters (for example a salt and iteration count)&period;
| *cipher*
| Cipher algorithm to use&period;
| *md*
| Digest used in the PBE key&hyphen;derivation function&period;
| *en&lowbar;de*
| 1 to encrypt, 0 to decrypt&period;
|===


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