ParagonIE_Sodium_Core_Curve25519::ge_tobytes() public WP 1.0
Convert a group element to a byte string.
{} Это метод класса: ParagonIE_Sodium_Core_Curve25519{}
Хуков нет.
Возвращает
Строку
. Null. Ничего.
Использование
$result = ParagonIE_Sodium_Core_Curve25519::ge_tobytes( $h );
- $h(ParagonIE_Sodium_Core_Curve25519_Ge_P2) (обязательный)
- -
Код ParagonIE_Sodium_Core_Curve25519::ge_tobytes() ParagonIE Sodium Core Curve25519::ge tobytes WP 5.7
public static function ge_tobytes(ParagonIE_Sodium_Core_Curve25519_Ge_P2 $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;
}