[#PKCS12_item_i2d_encrypt]
= PKCS12&lowbar;item&lowbar;i2d&lowbar;encrypt
:mrdocs:

Encode an ASN&period;1 object and encrypt the result&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:ASN1_OCTET_STRING.adoc[ASN1&lowbar;OCTET&lowbar;STRING]*
PKCS12&lowbar;item&lowbar;i2d&lowbar;encrypt(
    xref:X509_ALGOR.adoc[X509&lowbar;ALGOR]* algor,
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it,
    char const* pass,
    int passlen,
    void* obj,
    int zbuf);
----

== Return Value

Encrypted data as an ASN&period;1 octet string, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *algor*
| PBE algorithm identifier&period;
| *it*
| ASN&period;1 item descriptor for `obj&period;`
| *pass*
| Passphrase for encryption&period;
| *passlen*
| Length of `pass,` or &hyphen;1 to use strlen()&period;
| *obj*
| Object to encode and encrypt&period;
| *zbuf*
| If nonzero, zero the plaintext encoding buffer after encryption&period;
|===


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