Throw exception if using CAST5 without mcrypt
This commit is contained in:
@@ -154,6 +154,8 @@ class OpenPGP_Crypt_Symmetric {
|
|||||||
case 3:
|
case 3:
|
||||||
if(defined('MCRYPT_CAST_128')) {
|
if(defined('MCRYPT_CAST_128')) {
|
||||||
$cipher = new MCryptWrapper(MCRYPT_CAST_128);
|
$cipher = new MCryptWrapper(MCRYPT_CAST_128);
|
||||||
|
} else {
|
||||||
|
throw new Exception("Unsupported cipher: you must have mcrypt installed to use CAST5");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
|
Reference in New Issue
Block a user