ParagonIE_Sodium_Core32_Curve25519::negative

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core32_Curve25519::negative( string|int $char )

Parameters Parameters

$char

(string|int) (Required)

Return Return

(int) (1 = yes, 0 = no)

Source Source

File: wp-includes/sodium_compat/src/Core32/Curve25519.php

    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);
    }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.