[#ASN1_STRING_set]
= ASN1&lowbar;STRING&lowbar;set
:mrdocs:

Copy `data` of length `len` into an ASN&period;1 string&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;STRING&lowbar;set(
    xref:ASN1_STRING.adoc[ASN1&lowbar;STRING]* str,
    void const* data,
    int len);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| String whose content is replaced with a copy of `data&period;`
| *data*
| Bytes to copy&semi; may be a C string when `len` is &hyphen;1&period;
| *len*
| Number of bytes at `data,` or &hyphen;1 to use strlen(`data)&period;`
|===


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