You are here

function mcrypt_module_open_safe in AES encryption 7

Safe version of mcrypt_module_open function.

3 calls to mcrypt_module_open_safe()
aes_decrypt in ./aes.module
Decrypts a string of encrypted data.
aes_encrypt in ./aes.module
Encrypts a string.
aes_make_iv in ./aes.module
Define or set aes_encryption_iv variable.

File

./aes.module, line 695
Main file of the AES encryption module.

Code

function mcrypt_module_open_safe($algorithm, $algorithm_directory, $mode, $mode_directory) {
  if (!function_exists('mcrypt_module_open')) {
    throw new Exception('AES: Mcrypt is selected as encryption implementation but is unavailable.');
  }
  return mcrypt_module_open($algorithm, $algorithm_directory, $mode, $mode_directory);
}