Make WordPress Core


Ignore:
Timestamp:
05/17/2019 10:57:19 AM (6 years ago)
Author:
tellyworth
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.

Props paragoninitiativeenterprises.
See #47186.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sodium_compat/lib/php72compat.php

    r44953 r45344  
    108108     * @param string $nonce
    109109     * @param string $key
    110      * @return string
     110     * @return string|bool
    111111     */
    112112    function sodium_crypto_aead_aes256gcm_decrypt($message, $assocData, $nonce, $key)
     
    154154     * @param string $nonce
    155155     * @param string $key
    156      * @return string
     156     * @return string|bool
    157157     */
    158158    function sodium_crypto_aead_chacha20poly1305_decrypt($message, $assocData, $nonce, $key)
     
    200200     * @param string $nonce
    201201     * @param string $key
    202      * @return string
     202     * @return string|bool
    203203     */
    204204    function sodium_crypto_aead_chacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key)
     
    246246     * @param string $nonce
    247247     * @param string $key
    248      * @return string
     248     * @return string|bool
    249249     */
    250250    function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key)
    251251    {
    252252        try {
    253             return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key);
     253            return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key, true);
    254254        } catch (Error $ex) {
    255255            return false;
     
    272272    function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key)
    273273    {
    274         return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key);
     274        return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key, true);
    275275    }
    276276}
     
    953953    /**
    954954     * @see ParagonIE_Sodium_Compat::increment()
    955      * @param &string $string
     955     * @param string $string
    956956     * @return void
    957957     * @throws SodiumException
     
    10101010    /**
    10111011     * @see ParagonIE_Sodium_Compat::memzero()
    1012      * @param string &$str
     1012     * @param string $str
    10131013     * @return void
    10141014     * @throws SodiumException
Note: See TracChangeset for help on using the changeset viewer.