array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.sodium-crypto-auth.php', 1 => 'sodium_crypto_auth', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Funciones', ), 'prev' => array ( 0 => 'function.sodium-crypto-auth-verify.php', 1 => 'sodium_crypto_auth_verify', ), 'next' => array ( 0 => 'function.sodium-crypto-box-keypair-from-secretkey-and-publickey.php', 1 => 'sodium_crypto_box_keypair_from_secretkey_and_publickey', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-auth.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 — Compute a tag for the message
Symmetric message authentication via sodium_crypto_auth() provides integrity, but not confidentiality.
Unlike with digital signatures (e.g. sodium_crypto_sign_detached()), any party capable of verifying a message is also capable of authenticating their own messages. (Hence, symmetric authentication.)
message
The message you intend to authenticate
key
Authentication key
Authentication tag