哈希空间 Ctrl + F 进行搜索
首页 php手册中文版 CSS中文手册 哈希文档 Markdown在线工具

PHP sodium 组件

sodium_crypto_auth_verify

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_auth_verifyVerifies that the tag is valid for the message

说明

sodium_crypto_auth_verify(string $mac, string $message, string $key): bool

Verify the authentication tag is valid for a given message and key.

Unlike with digital signatures (e.g. sodium_crypto_sign_verify_detached()), any party capable of verifying a message is also capable of authenticating their own messages. (Hence, symmetric authentication.)

参数

mac

Authentication tag produced by sodium_crypto_auth()

message

Message

key

Authentication key

返回值

成功时返回 true, 或者在失败时返回 false

打开 哈希空间 微信小程序中查看更佳