ParagonIE_Sodium_Core_Poly1305::onetimeauth() public WP 1.0
{} It's a method of the class: ParagonIE_Sodium_Core_Poly1305{}
No Hooks.
Return
String
. Null. Nothing.
Usage
$result = ParagonIE_Sodium_Core_Poly1305::onetimeauth( $m, $key );
- $m(string) (required)
- -
- $key(string) (required)
- -
Code of ParagonIE_Sodium_Core_Poly1305::onetimeauth() ParagonIE Sodium Core Poly1305::onetimeauth WP 5.7
public static function onetimeauth($m, $key)
{
if (self::strlen($key) < 32) {
throw new InvalidArgumentException(
'Key must be 32 bytes long.'
);
}
$state = new ParagonIE_Sodium_Core_Poly1305_State(
self::substr($key, 0, 32)
);
return $state
->update($m)
->finish();
}