Summery Summery
Constant-time conditional move.
Syntax Syntax
Parameters Parameters
- $f
-
(Required)
- $g
-
(Required)
- $b
-
(Required)
Return Return
Source Source
File: wp-includes/sodium_compat/src/Core/Curve25519.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); }