[#ASN1_mbstring_ncopy]
= ASN1&lowbar;mbstring&lowbar;ncopy
:mrdocs:

Like ASN1&lowbar;mbstring&lowbar;copy(), also enforcing minimum and maximum character counts&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;mbstring&lowbar;ncopy(
    xref:ASN1_STRING.adoc[ASN1&lowbar;STRING]** out,
    unsigned char const* in,
    int len,
    int inform,
    unsigned long mask,
    long minsize,
    long maxsize);
----

== Return Value

Positive ASN&period;1 string type on success, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| Destination&semi; if NULL a new string is allocated, otherwise &ast;`out` may be reused&period;
| *in*
| Input bytes in the encoding given by `inform&period;`
| *len*
| 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;
| *mask*
| B&lowbar;ASN1&lowbar;&ast; bitmask of permitted output string types (0 selects the default mask)&period;
| *minsize*
| Minimum character count (0 disables the check)&period;
| *maxsize*
| Maximum character count (0 disables the check)&period;
|===


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