Php/docs/function.openssl-x509-fingerprint
来自菜鸟教程
openssl_x509_fingerprint
(PHP 5 >= 5.6.0, PHP 7)
openssl_x509_fingerprint — 计算一个给定的x.509证书的指纹或摘要
说明
openssl_x509_fingerprint
( mixed $x509
[, string $hash_algorithm = "sha1"
[, bool $raw_output = false
]] ) : string
openssl_x509_fingerprint() 返回x509的字符串类型的摘要。
参数
x509- 参见密钥/证书参数以获取有效值列表。
hash_algorithm- 使用的摘要方法或散列算法,比如, "sha256", openssl_get_md_methods()摘要算法之一。
raw_output- 设置为
true时,输出原始二进制数据。设置为false时,输出小写的16进制字符串。
返回值
将包含计算的证书指纹的字符串返回为小写16进制格式,除非将raw_output设置为TRUE,在这种情况下会返回消息摘要的原始二进制表示形式。
失败则返回 false .