Throw exception if using CAST5 without mcrypt

This commit is contained in:
Stephen Paul Weber 2016-07-26 18:44:49 -05:00
parent 859efcbee3
commit de41f143e6

View File

@ -154,6 +154,8 @@ class OpenPGP_Crypt_Symmetric {
case 3:
if(defined('MCRYPT_CAST_128')) {
$cipher = new MCryptWrapper(MCRYPT_CAST_128);
} else {
throw new Exception("Unsupported cipher: you must have mcrypt installed to use CAST5");
}
break;
case 7: