openssl_cms_encrypt
Encrypt a CMS message
Description
bool openssl_cms_encrypt(
string $input_filename
,
string $output_filename
,
OpenSSLCertificatearraystring $certificate
,
arraynull $headers
,
int $flags
= 0,
int $encoding
= OPENSSL_ENCODING_SMIME
,
int $cipher_algo
= OPENSSL_CIPHER_AES_128_CBC
)
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.
Return Values
Returns true
on success or false
on failure.