[#EVP_PBE_alg_add]
= EVP&lowbar;PBE&lowbar;alg&lowbar;add
:mrdocs:

Register a password&hyphen;based encryption algorithm by NID with cipher, digest, and keygen&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PBE&lowbar;alg&lowbar;add(
    int nid,
    xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const* cipher,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* md,
    xref:EVP_PBE_KEYGEN.adoc[EVP&lowbar;PBE&lowbar;KEYGEN]* keygen);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nid*
| NID of the PBE algorithm OID being registered&period;
| *cipher*
| Cipher used by the algorithm, or NULL if none&period;
| *md*
| Digest used by the algorithm, or NULL if none&period;
| *keygen*
| Key&sol;IV derivation callback invoked for this PBE algorithm&period;
|===


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