[#PKCS7_set_cipher]
= PKCS7&lowbar;set&lowbar;cipher
:mrdocs:

Set the content&hyphen;encryption cipher on an enveloped or encrypted PKCS&num;7 structure&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS7&lowbar;set&lowbar;cipher(
    xref:PKCS7.adoc[PKCS7]* p7,
    xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const* cipher);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p7*
| PKCS&num;7 EnvelopedData, SignedAndEnvelopedData, or EncryptedData object&period;
| *cipher*
| Symmetric cipher used to encrypt the content (must support ASN&period;1 parameters)&period;
|===


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