mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
General: Add sodium_compat library for crypto APIs in PHP < 7.2
This adds a pure PHP implementation of the cryptographic functions supported in PHP 7.2+. It provides the necessary backwards compatibility required to support signature verification and other security features going forward across all supported PHP versions. Props paragoninitiativeenterprises Fixes #45806. See #39309. git-svn-id: https://develop.svn.wordpress.org/trunk@44953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -442,6 +442,10 @@ if ( ! interface_exists( 'JsonSerializable' ) ) {
|
||||
if ( ! function_exists( 'random_int' ) ) {
|
||||
require ABSPATH . WPINC . '/random_compat/random.php';
|
||||
}
|
||||
// sodium_crypto_box was introduced in PHP 7.2
|
||||
if ( ! function_exists( 'sodium_crypto_box' ) ) {
|
||||
require ABSPATH . WPINC . '/sodium_compat/autoload.php';
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'array_replace_recursive' ) ) :
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user