function aes_get_available_aes_implementations in AES encryption 6
Same name and namespace in other branches
- 7 aes.install \aes_get_available_aes_implementations()
3 calls to aes_get_available_aes_implementations()
- aes_install in ./
aes.install - aes_requirements in ./
aes.install - aes_update_6100 in ./
aes.install
File
- ./
aes.install, line 25
Code
function aes_get_available_aes_implementations() {
$phpsec_include_path = dirname(__FILE__) . "/phpseclib";
set_include_path(get_include_path() . PATH_SEPARATOR . $phpsec_include_path);
$phpsec_available = true;
if (file_exists($phpsec_include_path . '/Crypt/AES.php') === false) {
$phpsec_available = false;
}
else {
if (is_readable($phpsec_include_path . '/Crypt/AES.php') === false) {
$phpsec_available = false;
}
}
if (extension_loaded("mcrypt")) {
$mcrypt_available = true;
}
else {
$mcrypt_available = false;
}
return array(
'mcrypt' => $mcrypt_available,
'phpseclib' => $phpsec_available,
);
}