[#PKCS12_unpack_p7encdata]
= PKCS12&lowbar;unpack&lowbar;p7encdata
:mrdocs:

Unpack safeBags from a PKCS&num;7 encrypted&hyphen;data ContentInfo&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
stack&lowbar;st&lowbar;PKCS12&lowbar;SAFEBAG*
PKCS12&lowbar;unpack&lowbar;p7encdata(
    xref:PKCS7.adoc[PKCS7]* p7,
    char const* pass,
    int passlen);
----

== Return Value

Stack of safeBags, or NULL if `p7` is not encrypted&hyphen;data or on decode error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p7*
| PKCS&num;7 encrypted&hyphen;data content info wrapping a PKCS12&lowbar;SAFEBAGS sequence&period;
| *pass*
| Passphrase for decryption&period;
| *passlen*
| Length of `pass,` or &hyphen;1 to use strlen()&period;
|===


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