[#ASN1_STRING_set_by_NID]
= ASN1&lowbar;STRING&lowbar;set&lowbar;by&lowbar;NID
:mrdocs:

Create or update an ASN&period;1 string from multibyte input using the string table for `nid&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;STRING&lowbar;set&lowbar;by&lowbar;NID(
    xref:ASN1_STRING.adoc[ASN1&lowbar;STRING]** out,
    unsigned char const* in,
    int inlen,
    int inform,
    int nid);
----

== Return Value

Resulting ASN1&lowbar;STRING, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| Optional destination&semi; if NULL a new string is allocated and returned&period;
| *in*
| Input bytes in the encoding given by `inform&period;`
| *inlen*
| Length of `in` in bytes, or &hyphen;1 if `in` is NUL&hyphen;terminated&period;
| *inform*
| Input encoding (MBSTRING&lowbar;ASC, MBSTRING&lowbar;BMP, MBSTRING&lowbar;UNIV, or MBSTRING&lowbar;UTF8)&period;
| *nid*
| Object NID whose ASN1&lowbar;STRING&lowbar;TABLE entry selects allowed string types and size limits&period;
|===


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