Make WordPress Core


Ignore:
Timestamp:
12/09/2019 04:44:58 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.12.1.

This includes a speedup for signature verification on most platforms and bugfixes for 32-bit platforms.

Props paragoninitiativeenterprises, lukaswaudentio.
Merges [46858] to the 5.3 branch.
Fixes #48371.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-includes/sodium_compat/src/Core/Poly1305/State.php

    r44953 r46859  
    8181
    8282    /**
     83     * Zero internal buffer upon destruction
     84     */
     85    public function __destruct()
     86    {
     87        $this->r[0] ^= $this->r[0];
     88        $this->r[1] ^= $this->r[1];
     89        $this->r[2] ^= $this->r[2];
     90        $this->r[3] ^= $this->r[3];
     91        $this->r[4] ^= $this->r[4];
     92        $this->h[0] ^= $this->h[0];
     93        $this->h[1] ^= $this->h[1];
     94        $this->h[2] ^= $this->h[2];
     95        $this->h[3] ^= $this->h[3];
     96        $this->h[4] ^= $this->h[4];
     97        $this->pad[0] ^= $this->pad[0];
     98        $this->pad[1] ^= $this->pad[1];
     99        $this->pad[2] ^= $this->pad[2];
     100        $this->pad[3] ^= $this->pad[3];
     101        $this->leftover = 0;
     102        $this->final = true;
     103    }
     104
     105    /**
    83106     * @internal You should not use this directly from another application
    84107     *
     
    91114    {
    92115        $bytes = self::strlen($message);
     116        if ($bytes < 1) {
     117            return $this;
     118        }
    93119
    94120        /* handle leftover */
     
    112138
    113139            $this->blocks(
    114                 static::intArrayToString($this->buffer),
     140                self::intArrayToString($this->buffer),
    115141                ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE
    116142            );
     
    297323            $this->blocks(
    298324                self::substr(
    299                     static::intArrayToString($this->buffer),
     325                    self::intArrayToString($this->buffer),
    300326                    0,
    301327                    ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE
Note: See TracChangeset for help on using the changeset viewer.