wppaste
WordPress

ParagonIE_Sodium_Compat

Source
wp-includes/sodium_compat/src/Compat.php:31

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 2

$disableFallbackForUnitTestsboolpublic static
This parameter prevents the use of the PECL extension.
$fastMultboolpublic static
Use fast multiplication rather than our constant-time multiplication implementation. Can be enabled at runtime. Only enable this if you are absolutely certain that there is no timing leak on your platform.

Methods · 128

Source code

class ParagonIE_Sodium_Compat{    /**     * This parameter prevents the use of the PECL extension.     * It should only be used for unit testing.     *     * @var bool     */    public static $disableFallbackForUnitTests = false;     /**     * Use fast multiplication rather than our constant-time multiplication     * implementation. Can be enabled at runtime. Only enable this if you     * are absolutely certain that there is no timing leak on your platform.     *     * @var bool     */    public static $fastMult = false;     const LIBRARY_MAJOR_VERSION = 9;    const LIBRARY_MINOR_VERSION = 1;    const LIBRARY_VERSION_MAJOR = 9;    const LIBRARY_VERSION_MINOR = 1;    const VERSION_STRING = 'polyfill-1.0.8';     // From libsodium    const BASE64_VARIANT_ORIGINAL = 1;    const BASE64_VARIANT_ORIGINAL_NO_PADDING = 3;    const BASE64_VARIANT_URLSAFE = 5;    const BASE64_VARIANT_URLSAFE_NO_PADDING = 7;    const CRYPTO_AEAD_AES256GCM_KEYBYTES = 32;    const CRYPTO_AEAD_AES256GCM_NSECBYTES = 0;    const CRYPTO_AEAD_AES256GCM_NPUBBYTES = 12;    const CRYPTO_AEAD_AES256GCM_ABYTES = 16;    const CRYPTO_AEAD_AEGIS128L_KEYBYTES = 16;    const CRYPTO_AEAD_AEGIS128L_NSECBYTES = 0;    const CRYPTO_AEAD_AEGIS128L_NPUBBYTES = 16;    const CRYPTO_AEAD_AEGIS128L_ABYTES = 32;    const CRYPTO_AEAD_AEGIS256_KEYBYTES = 32;    const CRYPTO_AEAD_AEGIS256_NSECBYTES = 0;    const CRYPTO_AEAD_AEGIS256_NPUBBYTES = 32;    const CRYPTO_AEAD_AEGIS256_ABYTES = 32;    const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32;    const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0;    const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8;    const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16;    const CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = 32;    const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = 0;    const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = 12;    const CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = 16;    const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES = 32;    const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES = 0;    const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES = 24;    const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES = 16;    const CRYPTO_AUTH_BYTES = 32;    const CRYPTO_AUTH_KEYBYTES = 32;    const CRYPTO_BOX_SEALBYTES = 16;    const CRYPTO_BOX_SECRETKEYBYTES = 32;    const CRYPTO_BOX_PUBLICKEYBYTES = 32;    const CRYPTO_BOX_KEYPAIRBYTES = 64;    const CRYPTO_BOX_MACBYTES = 16;    const CRYPTO_BOX_NONCEBYTES = 24;    const CRYPTO_BOX_SEEDBYTES = 32;    const CRYPTO_CORE_RISTRETTO255_BYTES = 32;    const CRYPTO_CORE_RISTRETTO255_SCALARBYTES = 32;    const CRYPTO_CORE_RISTRETTO255_HASHBYTES = 64;    const CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES = 64;    const CRYPTO_KDF_BYTES_MIN = 16;    const CRYPTO_KDF_BYTES_MAX = 64;    const CRYPTO_KDF_CONTEXTBYTES = 8;    const CRYPTO_KDF_KEYBYTES = 32;    const CRYPTO_KX_BYTES = 32;    const CRYPTO_KX_PRIMITIVE = 'x25519blake2b';    const CRYPTO_KX_SEEDBYTES = 32;    const CRYPTO_KX_KEYPAIRBYTES = 64;    const CRYPTO_KX_PUBLICKEYBYTES = 32;    const CRYPTO_KX_SECRETKEYBYTES = 32;    const CRYPTO_KX_SESSIONKEYBYTES = 32;    const CRYPTO_GENERICHASH_BYTES = 32;    const CRYPTO_GENERICHASH_BYTES_MIN = 16;

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/sodium_compat/src/Compat.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.