Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: 签名算法 - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: 签名算法

2025-04-28

签名算法

OPENSSL_ALGO_DSS1 (int)
OPENSSL_ALGO_SHA1 (int)
openssl_sign()openssl_verify() 函数使用的默认算法。
OPENSSL_ALGO_SHA224 (int)
OPENSSL_ALGO_SHA256 (int)
OPENSSL_ALGO_SHA384 (int)
OPENSSL_ALGO_SHA512 (int)
OPENSSL_ALGO_RMD160 (int)
OPENSSL_ALGO_MD5 (int)
OPENSSL_ALGO_MD4 (int)
OPENSSL_ALGO_MD2 (int)
只有在使用 MD2 支持编译 PHP 时,才可以使用这个常量。当在编译 PHP 时需要验证通过 DHAVE_OPENSSL_MD2_H CFLAGP,当编译 OpenSSL 1.0.0+ 版本时需要启用 enable-md2选项。
添加备注

用户贡献的备注 1 note

up
-1
tim at remitone dot com
1 year ago
It should be noted that the default signature algorithm used by openssl_sign() and openssl_verify (OPENSSL_ALGO_SHA1) is no longer supported by default in OpenSSL Version 3 series.

With an up to date OpenSSL library, one has to run
"update-crypto-policies --set LEGACY"
on the server where the library resides in order to allow these functions to work without the optional alternative algorithm argument.

官方地址:https://www.php.net/manual/en/openssl.signature-algos.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3