(PHP 8)
openssl_cms_encrypt — Encrypt a CMS message
$input_filename
, string $output_filename
, OpenSSLCertificate|array|string $certificate
, array|null $headers
, int $flags = 0
, int $encoding = OPENSSL_ENCODING_SMIME
, int $cipher_algo = OPENSSL_CIPHER_RC2_40
) : boolThis 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_CMS_SMIME,
OPENSLL_CMS_DER or OPENSSL_CMS_PEM.
cipher_algoA cypher to use.
成功时返回 true, 或者在失败时返回 false。