ParagonIE_Sodium_Core_Ristretto255::ristretto255_add() –

You appear to be a bot. Output may be restricted

Description

Usage

$string = ParagonIE_Sodium_Core_Ristretto255::ristretto255_add( $p, $q );

Parameters

$p
( string ) required
$q
( string ) required

Returns

string

Source

File name: wordpress/wp-includes/sodium_compat/src/Core/Ristretto255.php


Lines:

1 to 15 of 15
    public static function ristretto255_add($p, $q)
    {
        $p_res = self::ristretto255_frombytes($p);
        $q_res = self::ristretto255_frombytes($q);
        if ($p_res['res'] !== 0 || $q_res['res'] !== 0) {
            throw new SodiumException('Could not add points');
        }
        $p_p3 = $p_res['h'];
        $q_p3 = $q_res['h'];
        $q_cached = self::ge_p3_to_cached($q_p3);
        $r_p1p1 = self::ge_add($p_p3, $q_cached);
        $r_p3 = self::ge_p1p1_to_p3($r_p1p1);
        return self::ristretto255_p3_tobytes($r_p3);
    }
 

 View on GitHub View on Trac