WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core_Ristretto255::ristretto255_sub() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Core_Ristretto255{}

No Hooks.

Return

String.

Usage

$result = ParagonIE_Sodium_Core_Ristretto255::ristretto255_sub( $p, $q );
$p(string) (required)
-
$q(string) (required)
-

Code of ParagonIE_Sodium_Core_Ristretto255::ristretto255_sub() WP 5.8.2

public static function ristretto255_sub($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_sub($p_p3, $q_cached);
    $r_p3 = self::ge_p1p1_to_p3($r_p1p1);
    return self::ristretto255_p3_tobytes($r_p3);
}