[#ASN1_item_pack]
= ASN1&lowbar;item&lowbar;pack
:mrdocs:

Encode `obj` with `it` and store the DER result in an OCTET STRING&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:ASN1_STRING.adoc[ASN1&lowbar;STRING]*
ASN1&lowbar;item&lowbar;pack(
    void* obj,
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it,
    xref:ASN1_OCTET_STRING.adoc[ASN1&lowbar;OCTET&lowbar;STRING]** oct);
----

== Return Value

The OCTET STRING holding the encoded bytes, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *obj*
| Typed ASN&period;1 value to encode&period;
| *it*
| ASN&period;1 item descriptor for `obj&period;`
| *oct*
| Optional destination OCTET STRING pointer&semi; if NULL or &ast;`oct` is NULL a new string is allocated&period;
|===


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