Set $this->paddable to true in a few missing places

This commit is contained in:
terrafrost 2012-11-16 02:59:06 -06:00
parent 8cf6bb0b1c
commit 2a1909fd71
2 changed files with 2 additions and 1 deletions

View File

@ -723,7 +723,7 @@ class Crypt_DES {
mcrypt_generic_init($this->demcrypt, $this->keys, $this->decryptIV);
}
return $this->mode != 'ctr' ? $this->_unpad($plaintext) : $plaintext;
return $this->paddable ? $this->_unpad($plaintext) : $plaintext;
}
if (!is_array($this->keys)) {

View File

@ -265,6 +265,7 @@ class Crypt_TripleDES {
new Crypt_DES(CRYPT_DES_MODE_CBC),
new Crypt_DES(CRYPT_DES_MODE_CBC)
);
$this->paddable = true;
// we're going to be doing the padding, ourselves, so disable it in the Crypt_DES objects
$this->des[0]->disablePadding();