Do not throw when CAST5 unsupported
While this message may be more helpful, it will break some cases, such as when there are multiple ciphers that could be used and we can just skip CAST5 and move on. Return NULL when CAST5 unsupported, just like for other unsupported ciphers.
This commit is contained in:
parent
43497a15c0
commit
44e1bb2902
@ -159,8 +159,6 @@ class OpenPGP_Crypt_Symmetric {
|
||||
$cipher = new OpenSSLWrapper("CAST5-CFB");
|
||||
} else 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 4:
|
||||
|
Loading…
Reference in New Issue
Block a user