ParagonIE_Sodium_Core_BLAKE2b::increment_counter() public WP 1.0
{} Это метод класса: ParagonIE_Sodium_Core_BLAKE2b{}
Хуков нет.
Возвращает
null.
Использование
$result = ParagonIE_Sodium_Core_BLAKE2b::increment_counter( $ctx, $inc );
- $ctx(SplFixedмассив) (обязательный)
- -
- $inc(число) (обязательный)
- -
Код ParagonIE_Sodium_Core_BLAKE2b::increment_counter() ParagonIE Sodium Core BLAKE2b::increment counter WP 5.6.2
public static function increment_counter($ctx, $inc)
{
if ($inc < 0) {
throw new SodiumException('Increasing by a negative number makes no sense.');
}
$t = self::to64($inc);
# S->t is $ctx[1] in our implementation
# S->t[0] = ( uint64_t )( t >> 0 );
$ctx[1][0] = self::add64($ctx[1][0], $t);
# S->t[1] += ( S->t[0] < inc );
if (self::flatten64($ctx[1][0]) < $inc) {
$ctx[1][1] = self::add64($ctx[1][1], self::to64(1));
}
}