[#ASN1_item_ndef_i2d]
= ASN1&lowbar;item&lowbar;ndef&lowbar;i2d
:mrdocs:

Encode an ASN&period;1 value to DER&sol;BER using indefinite&hyphen;length (NDEF) constructed form where applicable&period;

== Synopsis

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

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

== Return Value

Number of bytes encoded, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *val*
| Value to encode (typed according to `it)&period;`
| *out*
| Destination pointer updated like a standard i2d encoder, or NULL to measure length&period;
| *it*
| ASN&period;1 item descriptor for the type of `val&period;`
|===


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