WordPress at a glance
function is not described

ParagonIE_Sodium_Crypto::scalarmult_throw_if_zero() protected WP 1.0

This throws an Error if a zero public key was passed to the function.

{} It's a method of the class: ParagonIE_Sodium_Crypto{}

No Hooks.

Return

null. Null. Nothing.

Usage

$result = ParagonIE_Sodium_Crypto::scalarmult_throw_if_zero( $q );
$q(string) (required)
-

Code of ParagonIE_Sodium_Crypto::scalarmult_throw_if_zero() WP 5.7

<?php
protected static function scalarmult_throw_if_zero($q)
{
    $d = 0;
    for ($i = 0; $i < self::box_curve25519xsalsa20poly1305_SECRETKEYBYTES; ++$i) {
        $d |= ParagonIE_Sodium_Core_Util::chrToInt($q[$i]);
    }

    /* branch-free variant of === 0 */
    if (-(1 & (($d - 1) >> 8))) {
        throw new SodiumException('Zero public key is not allowed');
    }
}