WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core_Curve25519::cmov() public WP 1.0

Conditional move

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

No Hooks.

Return

ParagonIE_Sodium_Core_Curve25519_Ge_Precomp.

Usage

$result = ParagonIE_Sodium_Core_Curve25519::cmov(;

Code of ParagonIE_Sodium_Core_Curve25519::cmov() WP 5.8.3

public static function cmov(
    ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $t,
    ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $u,
    $b
) {
    if (!is_int($b)) {
        throw new InvalidArgumentException('Expected an integer.');
    }
    return new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp(
        self::fe_cmov($t->yplusx,  $u->yplusx,  $b),
        self::fe_cmov($t->yminusx, $u->yminusx, $b),
        self::fe_cmov($t->xy2d,    $u->xy2d,    $b)
    );
}