ParagonIE_Sodium_Core32_Curve25519::fe_isnegative

Advertisement

Summery Summery

Is a field element negative? (1 = yes, 0 = no. Used in calculations.)

Syntax Syntax

ParagonIE_Sodium_Core32_Curve25519::fe_isnegative( ParagonIE_Sodium_Core32_Curve25519_Fe $f )

Parameters Parameters

$f

(Required)

Return Return

(int)

Source Source

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

    public static function fe_isnegative(ParagonIE_Sodium_Core32_Curve25519_Fe $f)
    {
        $str = self::fe_tobytes($f);
        return (int) (self::chrToInt($str[0]) & 1);
    }

Advertisement

Advertisement

Leave a Reply