wppaste
WordPress

ParagonIE_Sodium_Core32_X25519

Source
wp-includes/sodium_compat/src/Core32/X25519.php:10
Class ParagonIE_Sodium_Core32_X25519

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Methods · 5

Source code

abstract class ParagonIE_Sodium_Core32_X25519 extends ParagonIE_Sodium_Core32_Curve25519{    /**     * Alters the objects passed to this method in place.     *     * @internal You should not use this directly from another application     *     * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f     * @param ParagonIE_Sodium_Core32_Curve25519_Fe $g     * @param int $b     * @return void     * @throws SodiumException     * @throws TypeError     * @psalm-suppress MixedMethodCall     */    public static function fe_cswap(        ParagonIE_Sodium_Core32_Curve25519_Fe $f,        ParagonIE_Sodium_Core32_Curve25519_Fe $g,        $b = 0    ) {        $f0 = (int) $f[0]->toInt();        $f1 = (int) $f[1]->toInt();        $f2 = (int) $f[2]->toInt();        $f3 = (int) $f[3]->toInt();        $f4 = (int) $f[4]->toInt();        $f5 = (int) $f[5]->toInt();        $f6 = (int) $f[6]->toInt();        $f7 = (int) $f[7]->toInt();        $f8 = (int) $f[8]->toInt();        $f9 = (int) $f[9]->toInt();        $g0 = (int) $g[0]->toInt();        $g1 = (int) $g[1]->toInt();        $g2 = (int) $g[2]->toInt();        $g3 = (int) $g[3]->toInt();        $g4 = (int) $g[4]->toInt();        $g5 = (int) $g[5]->toInt();        $g6 = (int) $g[6]->toInt();        $g7 = (int) $g[7]->toInt();        $g8 = (int) $g[8]->toInt();        $g9 = (int) $g[9]->toInt();        $b = -$b;        /** @var int $x0 */        $x0 = ($f0 ^ $g0) & $b;        /** @var int $x1 */        $x1 = ($f1 ^ $g1) & $b;        /** @var int $x2 */        $x2 = ($f2 ^ $g2) & $b;        /** @var int $x3 */        $x3 = ($f3 ^ $g3) & $b;        /** @var int $x4 */        $x4 = ($f4 ^ $g4) & $b;        /** @var int $x5 */        $x5 = ($f5 ^ $g5) & $b;        /** @var int $x6 */        $x6 = ($f6 ^ $g6) & $b;        /** @var int $x7 */        $x7 = ($f7 ^ $g7) & $b;        /** @var int $x8 */        $x8 = ($f8 ^ $g8) & $b;        /** @var int $x9 */        $x9 = ($f9 ^ $g9) & $b;        $f[0] = ParagonIE_Sodium_Core32_Int32::fromInt($f0 ^ $x0);        $f[1] = ParagonIE_Sodium_Core32_Int32::fromInt($f1 ^ $x1);        $f[2] = ParagonIE_Sodium_Core32_Int32::fromInt($f2 ^ $x2);        $f[3] = ParagonIE_Sodium_Core32_Int32::fromInt($f3 ^ $x3);        $f[4] = ParagonIE_Sodium_Core32_Int32::fromInt($f4 ^ $x4);        $f[5] = ParagonIE_Sodium_Core32_Int32::fromInt($f5 ^ $x5);        $f[6] = ParagonIE_Sodium_Core32_Int32::fromInt($f6 ^ $x6);        $f[7] = ParagonIE_Sodium_Core32_Int32::fromInt($f7 ^ $x7);        $f[8] = ParagonIE_Sodium_Core32_Int32::fromInt($f8 ^ $x8);        $f[9] = ParagonIE_Sodium_Core32_Int32::fromInt($f9 ^ $x9);        $g[0] = ParagonIE_Sodium_Core32_Int32::fromInt($g0 ^ $x0);        $g[1] = ParagonIE_Sodium_Core32_Int32::fromInt($g1 ^ $x1);        $g[2] = ParagonIE_Sodium_Core32_Int32::fromInt($g2 ^ $x2);        $g[3] = ParagonIE_Sodium_Core32_Int32::fromInt($g3 ^ $x3);        $g[4] = ParagonIE_Sodium_Core32_Int32::fromInt($g4 ^ $x4);        $g[5] = ParagonIE_Sodium_Core32_Int32::fromInt($g5 ^ $x5);        $g[6] = ParagonIE_Sodium_Core32_Int32::fromInt($g6 ^ $x6);        $g[7] = ParagonIE_Sodium_Core32_Int32::fromInt($g7 ^ $x7);        $g[8] = ParagonIE_Sodium_Core32_Int32::fromInt($g8 ^ $x8);

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/sodium_compat/src/Core32/X25519.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.