ParagonIE_Sodium_Core32_Curve25519::fe_add

Advertisement

Summery Summery

Add two field elements.

Syntax Syntax

ParagonIE_Sodium_Core32_Curve25519::fe_add( ParagonIE_Sodium_Core32_Curve25519_Fe $f, ParagonIE_Sodium_Core32_Curve25519_Fe $g )

Parameters Parameters

$f

(Required)

$g

(Required)

Return Return

(ParagonIE_Sodium_Core32_Curve25519_Fe)

Source Source

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

    public static function fe_add(
        ParagonIE_Sodium_Core32_Curve25519_Fe $f,
        ParagonIE_Sodium_Core32_Curve25519_Fe $g
    ) {
        $arr = array();
        for ($i = 0; $i < 10; ++$i) {
            $arr[$i] = $f[$i]->addInt32($g[$i]);
        }
        /** @var array<int, ParagonIE_Sodium_Core32_Int32> $arr */
        return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray($arr);
    }

Advertisement

Advertisement

Leave a Reply