deemru / blake2b
纯PHP实现的BLAKE2哈希函数
1.0.1
2019-02-03 14:36 UTC
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-08-29 05:26:14 UTC
README
- 加密兼容的Blake2b
- 如果你有PHP >= 7.2并且安装了Sodium,请使用
sodium_crypto_generichash()
使用方法
$blake2b = new Blake2b(); $hash = $blake2b->hash( 'Hello, world!' ); if( $hash !== hex2bin( 'b5da441cfe72ae042ef4d2b17742907f675de4da57462d4c3609c2e2ed755970' ) ) exit( 1 );
要求
- PHP >= 5.4
安装
通过Composer要求
{ "require": { "deemru/blake2b": "1.0.*" } }