Make WordPress Core


Ignore:
Timestamp:
05/17/2019 05:19:21 PM (5 years ago)
Author:
desrosj
Message:

Upgrade/Install: Update sodium_compat to v1.10.0.

This adds a runtime_speed_test() method for estimating if the 32-bit implementation is fast enough for expensive computations.

Merges [45344] to the 5.2 branch.

Props paragoninitiativeenterprises, tellyworth.
See #47186.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-includes/sodium_compat/src/File.php

    r44953 r45355  
    591591        $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64);
    592592
    593         /** @var resource $hs */
    594593        $hs = hash_init('sha512');
    595594        hash_update($hs, self::substr($az, 32, 32));
     
    611610        );
    612611
    613         /** @var resource $hs */
    614612        $hs = hash_init('sha512');
    615613        hash_update($hs, self::substr($sig, 0, 32));
     
    720718        $A = ParagonIE_Sodium_Core_Ed25519::ge_frombytes_negate_vartime($publicKey);
    721719
    722         /** @var resource $hs */
    723720        $hs = hash_init('sha512');
    724721        hash_update($hs, self::substr($sig, 0, 32));
     
    10801077     * @param resource $fp
    10811078     * @param int $size
    1082      * @return mixed (resource on PHP < 7.2, object on PHP >= 7.2)
     1079     * @return resource|object Resource on PHP < 7.2, HashContext object on PHP >= 7.2
    10831080     * @throws SodiumException
    10841081     * @throws TypeError
     
    10961093                throw new TypeError('Argument 1 must be a resource, ' . gettype($hash) . ' given.');
    10971094            }
    1098 
    10991095        } else {
    11001096            if (!is_object($hash)) {
     
    11021098            }
    11031099        }
     1100
    11041101        if (!is_resource($fp)) {
    11051102            throw new TypeError('Argument 2 must be a resource, ' . gettype($fp) . ' given.');
     
    11681165        $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64);
    11691166
    1170         /** @var resource $hs */
    11711167        $hs = hash_init('sha512');
    11721168        hash_update($hs, self::substr($az, 32, 32));
     
    11881184        );
    11891185
    1190         /** @var resource $hs */
    11911186        $hs = hash_init('sha512');
    11921187        hash_update($hs, self::substr($sig, 0, 32));
     
    12731268        $A = ParagonIE_Sodium_Core32_Ed25519::ge_frombytes_negate_vartime($publicKey);
    12741269
    1275         /** @var resource $hs */
    12761270        $hs = hash_init('sha512');
    12771271        hash_update($hs, self::substr($sig, 0, 32));
Note: See TracChangeset for help on using the changeset viewer.