ManaPHP\Security\Crypt::__construct PHP Method

__construct() public method

Crypt constructor.
public __construct ( string | array $options = [] )
$options string | array
    public function __construct($options = [])
    {
        if (!extension_loaded('mcrypt')) {
            throw new CryptException('`mcrypt` extension is required');
        }
        if (is_string($options)) {
            $options = ['key' => $options];
        }
        $this->_key = isset($options['key']) ? $options['key'] : $this->configure->getSecretKey('crypt');
        $this->_mcrypt = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
    }