Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-inclu.../sodium_c.../src/Core32
File: Poly1305.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if (class_exists('ParagonIE_Sodium_Core32_Poly1305', false)) {
[2] Fix | Delete
return;
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Class ParagonIE_Sodium_Core32_Poly1305
[7] Fix | Delete
*/
[8] Fix | Delete
abstract class ParagonIE_Sodium_Core32_Poly1305 extends ParagonIE_Sodium_Core32_Util
[9] Fix | Delete
{
[10] Fix | Delete
const BLOCK_SIZE = 16;
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @internal You should not use this directly from another application
[14] Fix | Delete
*
[15] Fix | Delete
* @param string $m
[16] Fix | Delete
* @param string $key
[17] Fix | Delete
* @return string
[18] Fix | Delete
* @throws SodiumException
[19] Fix | Delete
* @throws TypeError
[20] Fix | Delete
*/
[21] Fix | Delete
public static function onetimeauth($m, $key)
[22] Fix | Delete
{
[23] Fix | Delete
if (self::strlen($key) < 32) {
[24] Fix | Delete
throw new InvalidArgumentException(
[25] Fix | Delete
'Key must be 32 bytes long.'
[26] Fix | Delete
);
[27] Fix | Delete
}
[28] Fix | Delete
$state = new ParagonIE_Sodium_Core32_Poly1305_State(
[29] Fix | Delete
self::substr($key, 0, 32)
[30] Fix | Delete
);
[31] Fix | Delete
return $state
[32] Fix | Delete
->update($m)
[33] Fix | Delete
->finish();
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* @internal You should not use this directly from another application
[38] Fix | Delete
*
[39] Fix | Delete
* @param string $mac
[40] Fix | Delete
* @param string $m
[41] Fix | Delete
* @param string $key
[42] Fix | Delete
* @return bool
[43] Fix | Delete
* @throws SodiumException
[44] Fix | Delete
* @throws TypeError
[45] Fix | Delete
*/
[46] Fix | Delete
public static function onetimeauth_verify($mac, $m, $key)
[47] Fix | Delete
{
[48] Fix | Delete
if (self::strlen($key) < 32) {
[49] Fix | Delete
throw new InvalidArgumentException(
[50] Fix | Delete
'Key must be 32 bytes long.'
[51] Fix | Delete
);
[52] Fix | Delete
}
[53] Fix | Delete
$state = new ParagonIE_Sodium_Core32_Poly1305_State(
[54] Fix | Delete
self::substr($key, 0, 32)
[55] Fix | Delete
);
[56] Fix | Delete
$calc = $state
[57] Fix | Delete
->update($m)
[58] Fix | Delete
->finish();
[59] Fix | Delete
return self::verify_16($calc, $mac);
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function