isLibsodiumSetupCorrectly() public static méthode

Is Libsodium set up correctly? Use this to verify that you can use the newer versions of Halite correctly.
public static isLibsodiumSetupCorrectly ( boolean $echo = false ) : boolean
$echo boolean
Résultat boolean
Exemple #1
0
        exit(255);
    }
}
if (!isset($_SERVER['REQUEST_URI'])) {
    $_SERVER['REQUEST_URI'] = '';
}
/**
 * 2. Load the Airship functions
 */
require_once ROOT . '/Airship.php';
/**
 * 3. Let's autoload the composer packages
 */
require_once \dirname(ROOT) . '/vendor/autoload.php';
// Let's also make sure we're using a good version of libsodium
if (!Halite::isLibsodiumSetupCorrectly()) {
    die("Airship requires libsodium 1.0.9 or newer (with a stable version of the PHP bindings).");
}
/**
 * 4. Autoload the Engine files
 */
\Airship\autoload('Airship\\Alerts', '~/Alerts');
\Airship\autoload('Airship\\Engine', '~/Engine');
/**
 * 5. Load up the registry singleton for latest types
 */
$state = State::instance();
// 5a. Initialize the Gears.
require_once ROOT . '/gear_init.php';
/**
 * 6. Load the global functions
Exemple #2
0
 public function testLibsodiumDetection()
 {
     $this->assertTrue(Halite::isLibsodiumSetupCorrectly());
 }