function _encrypt_encryption_mcrypt_module_open in Encrypt 7.2
Wrapper around mcrypt_module_open() which throws an exception on error.
Throws
Exception
1 call to _encrypt_encryption_mcrypt_module_open()
- _encrypt_encryption_methods_mcrypt_aes_cbc in plugins/
encryption_methods/ mcrypt_aes_cbc.inc - Callback for Encrypt implementation: Mcrypt AES in CBC mode.
File
- plugins/
encryption_methods/ mcrypt_aes_cbc.inc, line 27
Code
function _encrypt_encryption_mcrypt_module_open($algorithm, $algorithm_directory, $mode, $mode_directory) {
if (!function_exists('mcrypt_module_open')) {
throw new Exception('mcrypt_module_open() does not exist.');
}
$result = mcrypt_module_open($algorithm, $algorithm_directory, $mode, $mode_directory);
if (!$result) {
throw new Exception('mcrypt_module_open() returned FALSE.');
}
return $result;
}