php sha256签名,PHP 使用 SHA256、SHA512 等 算法的写法

本文介绍了在PHP中使用SHA256和SHA512等哈希算法的方法,包括hash()函数的使用示例,并列出了PHP支持的所有哈希算法。
摘要由CSDN通过智能技术生成

PHP 有 md5()、sha1() ... 等等 function,不过现在建议使用 SHA224 以上(注),在 PHP 要怎么写呢?

MD5 is considered cryptographically broken and is unsuitable for further use.

The SHA1 algorithm might not be secure enough for ongoing use. It is recommended not to use SHA1.

SHA224: SHA224 produces a 224-bit (28-byte) hash value, typically rendered as a hexadecimal number, 56 digits long.

SHA256: SHA256 produces a 256-bit (32-byte) hash value, typically rendered as a hexadecimal number, 64 digits long.

SHA384: SHA384 produces a 384-bit (48-byte) hash value, typically rendered as a hexadecimal number, 96 digits long.

SHA512: SHA512 produces a 512-bit (64-byte) hash value, typically rendered as a hexadecimal number, 128 digits long.

RIPEMD160: RIPEMD160 produces a 160-bit (20-byte) hash value, typically rendered as a hexadecimal number, 40 digits long.

PHP 使用 SHA256、SHA512 等 哈希算法的写法

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值