Make WordPress Core


Ignore:
Timestamp:
12/03/2020 05:39:03 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.14.0.

This includes improved PHP 8 support and more inclusive language.

A full list of changes in this update can be found on GitHub:
https://github.com/paragonie/sodium_compat/compare/v1.13.0...v1.14.0

Follow-up to [48121], [49056], [49057].

Props jrf.
Fixes #51925.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sodium_compat/src/Core/SipHash.php

    r46586 r49741  
    1515     * @internal You should not use this directly from another application
    1616     *
    17      * @param int[] $v
    18      * @return int[]
     17     * @param array<array-key, int> $v
     18     * @return array<array-key, int>
     19     *
    1920     */
    2021    public static function sipRound(array $v)
     
    2728
    2829        #  v1=ROTL(v1,13);
    29         list($v[2], $v[3]) = self::rotl_64($v[2], $v[3], 13);
     30        list($v[2], $v[3]) = self::rotl_64((int) $v[2], (int) $v[3], 13);
    3031
    3132        #  v1 ^= v0;
    32         $v[2] ^= $v[0];
    33         $v[3] ^= $v[1];
     33        $v[2] = (int) $v[2] ^ (int) $v[0];
     34        $v[3] = (int) $v[3] ^ (int) $v[1];
    3435
    3536        #  v0=ROTL(v0,32);
     
    3839        # v2 += v3;
    3940        list($v[4], $v[5]) = self::add(
    40             array($v[4], $v[5]),
    41             array($v[6], $v[7])
     41            array((int) $v[4], (int) $v[5]),
     42            array((int) $v[6], (int) $v[7])
    4243        );
    4344
    4445        # v3=ROTL(v3,16);
    45         list($v[6], $v[7]) = self::rotl_64($v[6], $v[7], 16);
     46        list($v[6], $v[7]) = self::rotl_64((int) $v[6], (int) $v[7], 16);
    4647
    4748        #  v3 ^= v2;
    48         $v[6] ^= $v[4];
    49         $v[7] ^= $v[5];
     49        $v[6] = (int) $v[6] ^ (int) $v[4];
     50        $v[7] = (int) $v[7] ^ (int) $v[5];
    5051
    5152        # v0 += v3;
     
    5960
    6061        # v3 ^= v0;
    61         $v[6] ^= $v[0];
    62         $v[7] ^= $v[1];
     62        $v[6] = (int) $v[6] ^ (int) $v[0];
     63        $v[7] = (int) $v[7] ^ (int) $v[1];
    6364
    6465        # v2 += v1;
     
    7273
    7374        #  v1 ^= v2;;
    74         $v[2] ^= $v[4];
    75         $v[3] ^= $v[5];
     75        $v[2] = (int) $v[2] ^ (int) $v[4];
     76        $v[3] = (int) $v[3] ^ (int) $v[5];
    7677
    7778        # v2=ROTL(v2,32)
Note: See TracChangeset for help on using the changeset viewer.