(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_CBCThis function encrypts content to one or more recipients, based on the certificates that are passed to it.
input_filenameThe file to be encrypted.
output_filenameThe output file.
certificateRecipients to encrypt to.
headersHeaders to include when S/MIME is used.
flagsFlags to be passed to CMS_sign.
encoding
      An encoding to output. One of OPENSSL_ENCODING_SMIME,
      OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM.
     
cipher_algoA cypher to use.
   Returns true on success or false on failure.
  
| 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). |