ParagonIE_Sodium_Compat::useNewSodiumAPI

Advertisement

Summery Summery

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

Syntax Syntax

ParagonIE_Sodium_Compat::useNewSodiumAPI()

Return Return

(bool)

Source Source

File: wp-includes/sodium_compat/src/Compat.php

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

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.