ParagonIE_Sodium_Core32_Curve25519::fe_isnonzero() – Returns 0 if this field element results in all NUL bytes.

You appear to be a bot. Output may be restricted

Description

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

Usage

$bool = ParagonIE_Sodium_Core32_Curve25519::fe_isnonzero( $f );

Parameters

$f
( ParagonIE_Sodium_Core32_Curve25519_Fe ) required

Returns

bool

Source

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


Lines:

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

 View on GitHub View on Trac