[#EVP_PBE_CipherInit_ex]
= EVP&lowbar;PBE&lowbar;CipherInit&lowbar;ex
:mrdocs:

Initialize a cipher context for password&hyphen;based encryption using a library context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PBE&lowbar;CipherInit&lowbar;ex(
    xref:ASN1_OBJECT.adoc[ASN1&lowbar;OBJECT]* pbe&lowbar;obj,
    char const* pass,
    int passlen,
    xref:ASN1_TYPE.adoc[ASN1&lowbar;TYPE]* param,
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* ctx,
    int en&lowbar;de,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    char const* propq);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pbe&lowbar;obj*
| OID identifying the PBE algorithm&period;
| *pass*
| Password bytes&period;
| *passlen*
| Length of `pass` in bytes, or &hyphen;1 if `pass` is NUL&hyphen;terminated&period;
| *param*
| Algorithm parameters associated with `pbe&lowbar;obj&period;`
| *ctx*
| Cipher context to initialize&period;
| *en&lowbar;de*
| 1 to encrypt, or 0 to decrypt&period;
| *libctx*
| Library context for fetching algorithms, or NULL for the default&period;
| *propq*
| Property query string, or NULL&period;
|===


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