wp-includes/sodium_compat/src/Compat.php:4518Libsodium as implemented in PHP 7.2 and/or ext/sodium (via PECL)
bool protected static function useNewSodiumAPI() { static $res = null; if ($res === null) { $res = PHP_VERSION_ID >= 70000 && extension_loaded('sodium'); } if (self::$disableFallbackForUnitTests) { // Don't fallback. Use the PHP implementation. return false; } return (bool) $res; }Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
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.