ParagonIE_Sodium_Core32_Curve25519::fe_isnonzero

Advertisement

Summery Summery

Returns 0 if this field element results in all NUL bytes.

Syntax Syntax

ParagonIE_Sodium_Core32_Curve25519::fe_isnonzero( ParagonIE_Sodium_Core32_Curve25519_Fe $f )

Parameters Parameters

$f

(Required)

Return Return

(bool)

Source Source

File: wp-includes/sodium_compat/src/Core32/Curve25519.php

    public static function fe_isnonzero(ParagonIE_Sodium_Core32_Curve25519_Fe $f)
    {
        static $zero;
        if ($zero === null) {
            $zero = str_repeat("\x00", 32);
        }
        /** @var string $str */
        $str = self::fe_tobytes($f);
        /** @var string $zero */
        return !self::verify_32($str, $zero);
    }

Advertisement

Advertisement

Leave a Reply