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