public static function ParagonIE_Sodium_Core_Curve25519::negative in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Core/Curve25519.php \ParagonIE_Sodium_Core_Curve25519::negative()
@internal You should not use this directly from another application
Parameters
int|string $char:
Return value
int (1 = yes, 0 = no)
Throws
SodiumException
TypeError
1 call to ParagonIE_Sodium_Core_Curve25519::negative()
- ParagonIE_Sodium_Core_Curve25519::ge_select in vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php - @internal You should not use this directly from another application
File
- vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php, line 1658
Class
- ParagonIE_Sodium_Core_Curve25519
- Class ParagonIE_Sodium_Core_Curve25519
Code
public static function negative($char) {
if (is_int($char)) {
return $char < 0 ? 1 : 0;
}
$x = self::chrToInt(self::substr($char, 0, 1));
return (int) ($x >> 63);
}