ParagonIE_Sodium_Core_Ristretto255::fe_iszero()
Returns 0 if this field element results in all NUL bytes.
{} Это метод класса: ParagonIE_Sodium_Core_Ristretto255{}
Хуков нет.
Возвращает
int
.
Использование
$result = ParagonIE_Sodium_Core_Ristretto255::fe_iszero( $f );
- $f(ParagonIE_Sodium_Core_Curve25519_Fe) (обязательный)
- -
Код ParagonIE_Sodium_Core_Ristretto255::fe_iszero() ParagonIE Sodium Core Ristretto255::fe iszero WP 5.9.3
public static function fe_iszero(ParagonIE_Sodium_Core_Curve25519_Fe $f) { static $zero; if ($zero === null) { $zero = str_repeat("\x00", 32); } /** @var string $zero */ $str = self::fe_tobytes($f); $d = 0; for ($i = 0; $i < 32; ++$i) { $d |= self::chrToInt($str[$i]); } return (($d - 1) >> 31) & 1; }