ParagonIE_Sodium_Compat::crypto_auth

SummerySummery

Authenticate a message. Uses symmetric-key cryptography.

Syntax

ParagonIE_Sodium_Compat::crypto_auth( string $message, string $key )

DescriptionDescription

Algorithm: HMAC-SHA512-256. Which is HMAC-SHA-512 truncated to 256 bits. Not to be confused with HMAC-SHA-512/256 which would use the SHA-512/256 hash function (uses different initial parameters but still truncates to 256 bits to sidestep length-extension attacks).

ParametersParameters

$message

(string) (Required) Message to be authenticated

$key

(string) (Required) Symmetric authentication key

ReturnReturn

(string) Message authentication code

SourceSource

File: wp-includes/sodium_compat/src/Compat.php


			
Scroll to Top