array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'function.sodium-crypto-auth-verify.php', 1 => 'sodium_crypto_auth_verify', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Fonctions', ), 'prev' => array ( 0 => 'function.sodium-crypto-auth-keygen.php', 1 => 'sodium_crypto_auth_keygen', ), 'next' => array ( 0 => 'function.sodium-crypto-auth.php', 1 => 'sodium_crypto_auth', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-auth-verify.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_auth_verify — Verifies that the tag is valid for the message
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