public static function ParagonIE_Sodium_Core_Curve25519::ge_p3_tobytes in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core/Curve25519.php \ParagonIE_Sodium_Core_Curve25519::ge_p3_tobytes()
@internal You should not use this directly from another application
Parameters
ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h:
Return value
string
Throws
SodiumException
TypeError
2 calls to ParagonIE_Sodium_Core_Curve25519::ge_p3_tobytes()
- ParagonIE_Sodium_Core_Ed25519::sign_detached in vendor/
paragonie/ sodium_compat/ src/ Core/ Ed25519.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_Core_Ed25519::sk_to_pk in vendor/
paragonie/ sodium_compat/ src/ Core/ Ed25519.php - @internal You should not use this directly from another application
File
- vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php, line 1602
Class
- ParagonIE_Sodium_Core_Curve25519
- Class ParagonIE_Sodium_Core_Curve25519
Code
public static function ge_p3_tobytes(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h) {
$recip = self::fe_invert($h->Z);
$x = self::fe_mul($h->X, $recip);
$y = self::fe_mul($h->Y, $recip);
$s = self::fe_tobytes($y);
$s[31] = self::intToChr(self::chrToInt($s[31]) ^ self::fe_isnegative($x) << 7);
return $s;
}