array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.openssl-cms-encrypt.php', 1 => 'openssl_cms_encrypt', ), 'up' => array ( 0 => 'ref.openssl.php', 1 => 'OpenSSL Funções', ), 'prev' => array ( 0 => 'function.openssl-cms-decrypt.php', 1 => 'openssl_cms_decrypt', ), 'next' => array ( 0 => 'function.openssl-cms-read.php', 1 => 'openssl_cms_read', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/openssl/functions/openssl-cms-encrypt.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 8)
openssl_cms_encrypt — Encrypt a CMS message
$input_filename
,$output_filename
,$certificate
,$headers
,$flags
= 0,$encoding
= OPENSSL_ENCODING_SMIME
,$cipher_algo
= OPENSSL_CIPHER_AES_128_CBC
This function encrypts content to one or more recipients, based on the certificates that are passed to it.
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.
Versão | Descrição |
---|---|
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 ).
|