WordPress Cryptographic Compatibility Layer
wp-includes-sodium-compat is a critical cryptographic compatibility library for WordPress, providing secure encryption and decryption mechanisms across different PHP environments.
composer require paragonie/sodium_compat
use ParagonIE\Sodium\Compat;
$message = 'Secure WordPress Encryption';
$key = random_bytes(SODIUM_CRYPTO_SECRETBOX_KEYBYTES);
$nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$encrypted = Compat::crypto_secretbox($message, $nonce, $key);
Open-source project welcoming contributions. Help improve WordPress cryptographic compatibility!
GitHub Repository