[#ASN1_item_i2d_mem_bio]
= ASN1&lowbar;item&lowbar;i2d&lowbar;mem&lowbar;bio
:mrdocs:

Encode an ASN&period;1 value described by `it` into a newly allocated memory BIO&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BIO.adoc[BIO]*
ASN1&lowbar;item&lowbar;i2d&lowbar;mem&lowbar;bio(
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it,
    xref:ASN1_VALUE.adoc[ASN1&lowbar;VALUE] const* val);
----

== Return Value

Memory BIO holding the DER encoding, or NULL on error&semi; free with BIO&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *it*
| ASN&period;1 item descriptor for the type of `val&period;`
| *val*
| Value to encode (may be NULL for some optional types)&period;
|===


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