« sodium_crypto_aead_xchacha20poly1305_ietf_keygen
sodium_crypto_auth_keygen »

sodium_crypto_auth

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_auth — メッセージに対応するタグを計算する

説明

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

対称鍵によるメッセージ認証を行います。 sodium_crypto_auth() は完全性は提供しますが、機密性は提供しません。

(sodium_crypto_sign_detached() のような) 電子署名と異なり、 メッセージを検証する側は、 自分たちのメッセージを認証することもできます。 (つまり、対称鍵による認証です)

パラメータ

message

認証したいメッセージ

key

認証鍵

戻り値

認証タグを返します。

関連キーワード:
メッセージ   sodium   crypto   認証   auth   タグ   計算   keygen   message   対称   提供   aead   xchacha   poly   ietf   Sodium   SensitiveParameter   完全性   機密   detached   電子署名   検証   自分
関連する関数・ページ:
function.sodium-crypto-auth-verify   function.sodium-crypto-auth-keygen   function.sodium-crypto-box   function.sodium-crypto-stream-xor   function.sodium-crypto-sign   function.sodium-crypto-aead-aes256gcm-decrypt