[#EVP_CIPHER_param_to_asn1]
= EVP&lowbar;CIPHER&lowbar;param&lowbar;to&lowbar;asn1
:mrdocs:

Encode cipher parameters (typically including the IV) from `c` into an ASN1&lowbar;TYPE&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;CIPHER&lowbar;param&lowbar;to&lowbar;asn1(
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* c,
    xref:ASN1_TYPE.adoc[ASN1&lowbar;TYPE]* type);
----

== Return Value

1 on success, or 0&sol;&hyphen;1 on failure (for example if the cipher lacks ASN&period;1 support)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *c*
| Cipher context whose AlgorithmIdentifier parameters are written&semi; the IV must already be set&period;
| *type*
| Destination ASN&period;1 type that receives the parameters&period;
|===


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