WordPress at a glance
function is not described

ParagonIE_Sodium_Core_Curve25519::fe_cmov() public WP 1.0

Constant-time conditional move.

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

No Hooks.

Return

ParagonIE_Sodium_Core_Curve25519_Fe. Null. Nothing.

Usage

$result = ParagonIE_Sodium_Core_Curve25519::fe_cmov(;

Code of ParagonIE_Sodium_Core_Curve25519::fe_cmov() WP 5.7

<?php
public static function fe_cmov(
    ParagonIE_Sodium_Core_Curve25519_Fe $f,
    ParagonIE_Sodium_Core_Curve25519_Fe $g,
    $b = 0
) {
    /** @var array<int, int> $h */
    $h = array();
    $b *= -1;
    for ($i = 0; $i < 10; ++$i) {
        /** @var int $x */
        $x = (($f[$i] ^ $g[$i]) & $b);
        $h[$i] = (int) ((int) ($f[$i]) ^ $x);
    }
    return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($h);
}