sodium_crypto_auth
PHP Manual
PHP Manual»Sodium Funzioni»sodium_crypto_auth

sodium_crypto_auth

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_authCompute a tag for the message

Descrizione

function sodium_crypto_auth(string $message, #[\SensitiveParameter]string $key): string

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.)

Elenco dei parametri

message
The message you intend to authenticate
key
Authentication key

Valori restituiti

Authentication tag

To Top