Add support for CAST5 using mcrypt

This commit is contained in:
Stephen Paul Weber
2013-09-14 13:17:30 -05:00
parent e1181bd25e
commit d2913ccb8a
4 changed files with 42 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
require_once dirname(__FILE__).'/openpgp.php';
@include_once dirname(__FILE__).'/openpgp_crypt_rsa.php';
@include_once dirname(__FILE__).'/openpgp_mcrypt_wrapper.php';
@include_once 'Crypt/AES.php';
@include_once 'Crypt/TripleDES.php';
require_once 'Crypt/Random.php'; // part of phpseclib is absolutely required
@@ -148,6 +149,11 @@ class OpenPGP_Crypt_Symmetric {
$key_block_bytes = 8;
}
break;
case 3:
if(defined('MCRYPT_CAST_128')) {
$cipher = new MCryptWrapper(MCRYPT_CAST_128);
}
break;
case 7:
if(class_exists('Crypt_AES')) {
$cipher = new Crypt_AES(CRYPT_AES_MODE_CFB);