Make WordPress Core


Ignore:
Timestamp:
05/25/2021 01:54:12 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.16.1.

The latest version of sodium_compat includes polyfills for new features slated to land in PHP 8.1:
https://paragonie.com/blog/2021/05/ristretto255-for-php-community

It also fixes a race condition with the autoloader that caused an "undefined constant" error on some systems:
https://github.com/paragonie/sodium_compat/issues/122

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

Follow-up to [49741].

Props paragoninitiativeenterprises, oxyrealm.
Fixes #53274.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sodium_compat/src/Core32/Ed25519.php

    r48121 r51002  
    208208     * @throws SodiumException
    209209     * @throws TypeError
     210     * @psalm-suppress PossiblyInvalidArgument
    210211     */
    211212    public static function sign_detached($message, $sk)
     
    225226        # crypto_hash_sha512_final(&hs, nonce);
    226227        $hs = hash_init('sha512');
    227         hash_update($hs, self::substr($az, 32, 32));
    228         hash_update($hs, $message);
     228        self::hash_update($hs, self::substr($az, 32, 32));
     229        self::hash_update($hs, $message);
    229230        $nonceHash = hash_final($hs, true);
    230231
     
    245246        # crypto_hash_sha512_final(&hs, hram);
    246247        $hs = hash_init('sha512');
    247         hash_update($hs, self::substr($sig, 0, 32));
    248         hash_update($hs, self::substr($pk, 0, 32));
    249         hash_update($hs, $message);
     248        self::hash_update($hs, self::substr($sig, 0, 32));
     249        self::hash_update($hs, self::substr($pk, 0, 32));
     250        self::hash_update($hs, $message);
    250251        $hramHash = hash_final($hs, true);
    251252
Note: See TracChangeset for help on using the changeset viewer.