openssl_cms_encrypt
Encrypt a CMS message
&reftitle.description;
boolopenssl_cms_encrypt
stringinput_filename
stringoutput_filename
OpenSSLCertificatearraystringcertificate
arraynullheaders
intflags0
intencodingOPENSSL_ENCODING_SMIME
intcipher_algoOPENSSL_CIPHER_AES_128_CBC
This function encrypts content to one or more recipients,
based on the certificates that are passed to it.
&reftitle.parameters;
input_filename
The file to be encrypted.
output_filename
The output file.
certificate
Recipients to encrypt to.
headers
Headers to include when S/MIME is used.
flags
Flags to be passed to CMS_sign.
encoding
An encoding to output. One of OPENSSL_ENCODING_SMIME,
OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM.
cipher_algo
A cypher to use.
&reftitle.returnvalues;
&return.success;
&reftitle.changelog;
&Version;
&Description;
8.1.0
The default cipher algorithm (cipher_algo) is now
AES-128-CBC (OPENSSL_CIPHER_AES_128_CBC). Previously,
PKCS7/CMS was used (OPENSSL_CIPHER_RC2_40).