DES: apparently TripleDES extends DES

this was not always the case:

See c4752cbeba
This commit is contained in:
terrafrost 2014-12-20 11:14:29 -06:00
parent baf65d3fef
commit f91c4ccf60

View File

@ -674,10 +674,12 @@ class Crypt_DES extends Crypt_Base
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
if ($this->key_size_max == 8) {
if ($engine == CRYPT_ENGINE_OPENSSL) { if ($engine == CRYPT_ENGINE_OPENSSL) {
$this->cipher_name_openssl_ecb = 'des-ecb'; $this->cipher_name_openssl_ecb = 'des-ecb';
$this->cipher_name_openssl = 'des-' . $this->_openssl_translate_mode(); $this->cipher_name_openssl = 'des-' . $this->_openssl_translate_mode();
} }
}
return parent::isValidEngine($engine); return parent::isValidEngine($engine);
} }