ParagonIE_Sodium_Core_Curve25519::fe_isnegative

Advertisement

Summery Summery

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

Syntax Syntax

ParagonIE_Sodium_Core_Curve25519::fe_isnegative( ParagonIE_Sodium_Core_Curve25519_Fe $f )

Parameters Parameters

$f

(ParagonIE_Sodium_Core_Curve25519_Fe) (Required)

Return Return

(int)

Source Source

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

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

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.