WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Compat::useNewSodiumAPI() protected WP 1.0

Libsodium as implemented in PHP 7.2 and/or ext/sodium (via PECL)

{} It's a method of the class: ParagonIE_Sodium_Compat{}

No Hooks.

Return

true|false.

Usage

$result = ParagonIE_Sodium_Compat::useNewSodiumAPI();

Code of ParagonIE_Sodium_Compat::useNewSodiumAPI() WP 5.8.2

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;
}