Contao\Encryption::initialize PHP Method

initialize() protected static method

Initialize the encryption module
protected static initialize ( )
    protected static function initialize()
    {
        if (!in_array('mcrypt', get_loaded_extensions())) {
            throw new \Exception('The PHP mcrypt extension is not installed');
        }
        if ((self::$resTd = mcrypt_module_open(\Config::get('encryptionCipher'), '', \Config::get('encryptionMode'), '')) == false) {
            throw new \Exception('Error initializing encryption module');
        }
    }