ParagonIE_Sodium_Core_Curve25519::fe_sub()public staticWP 1.0

Subtract two field elements.

h = f - g

Preconditions:
|f| bounded by 1.12^25,1.12^24,1.12^25,1.12^24,etc.
|g| bounded by 1.12^25,1.12^24,1.12^25,1.12^24,etc.

Postconditions:
|h| bounded by 1.12^26,1.12^25,1.12^26,1.12^25,etc.

{} Это метод класса: ParagonIE_Sodium_Core_Curve25519{}

Хуков нет.

Возвращает

ParagonIE_Sodium_Core_Curve25519_Fe.

Использование

$result = ParagonIE_Sodium_Core_Curve25519::fe_sub( $f, $g );
$f(ParagonIE_Sodium_Core_Curve25519_Fe) (обязательный)
-
$g(ParagonIE_Sodium_Core_Curve25519_Fe) (обязательный)
-

Код ParagonIE_Sodium_Core_Curve25519::fe_sub() WP 6.0.2

public static function fe_sub(ParagonIE_Sodium_Core_Curve25519_Fe $f, ParagonIE_Sodium_Core_Curve25519_Fe $g)
{
    return self::fe_normalize(
        ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
            array(
                (int) ($f[0] - $g[0]),
                (int) ($f[1] - $g[1]),
                (int) ($f[2] - $g[2]),
                (int) ($f[3] - $g[3]),
                (int) ($f[4] - $g[4]),
                (int) ($f[5] - $g[5]),
                (int) ($f[6] - $g[6]),
                (int) ($f[7] - $g[7]),
                (int) ($f[8] - $g[8]),
                (int) ($f[9] - $g[9])
            )
        )
    );
}