WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core32_Poly1305::onetimeauth_verify() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Core32_Poly1305{}

No Hooks.

Return

true|false.

Usage

$result = ParagonIE_Sodium_Core32_Poly1305::onetimeauth_verify( $mac, $m, $key );
$mac(string) (required)
-
$m(string) (required)
-
$key(string) (required)
-

Code of ParagonIE_Sodium_Core32_Poly1305::onetimeauth_verify() WP 5.8.2

public static function onetimeauth_verify($mac, $m, $key)
{
    if (self::strlen($key) < 32) {
        throw new InvalidArgumentException(
            'Key must be 32 bytes long.'
        );
    }
    $state = new ParagonIE_Sodium_Core32_Poly1305_State(
        self::substr($key, 0, 32)
    );
    $calc = $state
        ->update($m)
        ->finish();
    return self::verify_16($calc, $mac);
}