openssl_cms_encrypt Encrypt a CMS message

发表日期:2021-07-01 08:55:21 | 来源: | | 浏览(481) 分类:OpenSSL 函数

openssl_cms_encrypt

(PHP 8)

openssl_cms_encryptEncrypt a CMS message

说明

openssl_cms_encrypt(
    string $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
): bool

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_CMS_SMIME, OPENSLL_CMS_DER or OPENSSL_CMS_PEM.

cipher_algo

A cypher to use.

返回值

成功时返回 true, 或者在失败时返回 false

集速网 copyRight © 2015-2022 宁ICP备15000399号-1 宁公网安备 64010402001209号
与其临渊羡鱼,不如退而结网
欢迎转载、分享、引用、推荐、收藏。