codecamp

PHP8 sodium_crypto_shorthash

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_shorthash — 计算消息和密钥的简短哈希值

说明

sodium_crypto_shorthash(string $message, string $key): string

sodium_crypto_shorthash() 包装一个名为 SipHash-2-4,非常适合实现不易受攻击的哈希表 哈希冲突拒绝服务攻击 (Hash-DoS)。

SipHash-2-4 不是通用加密哈希函数。

参数 

message

要哈希的消息。

key

哈希键。


PHP8 sodium_crypto_shorthash_keygen
PHP8 sodium_crypto_sign_detached
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定