[#PKCS8_set0_pbe]
= PKCS8&lowbar;set0&lowbar;pbe
:mrdocs:

Encrypt PKCS&num;8 private key info using a pre&hyphen;built PBE algorithm&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:X509_SIG.adoc[X509&lowbar;SIG]*
PKCS8&lowbar;set0&lowbar;pbe(
    char const* pass,
    int passlen,
    xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO]* p8inf,
    xref:X509_ALGOR.adoc[X509&lowbar;ALGOR]* pbe);
----

== Return Value

Encrypted key in an X509&lowbar;SIG, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pass*
| Passphrase for encryption&period;
| *passlen*
| Length of `pass,` or &hyphen;1 to use strlen()&period;
| *p8inf*
| Private key info to encrypt&period;
| *pbe*
| PBE algorithm parameters&period;
|===


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