mirror of
https://github.com/danog/phpseclib.git
synced 2025-01-22 04:51:19 +01:00
AES: CFB mode fix
This commit is contained in:
parent
5ce9ad6a42
commit
bbd62f6490
@ -412,10 +412,10 @@ class Crypt_AES extends Crypt_Rijndael {
|
||||
if ($last_pos) {
|
||||
$plaintext = mdecrypt_generic($this->demcrypt, substr($ciphertext, 0, $last_pos));
|
||||
$this->decryptIV = substr($ciphertext, $last_pos - 16, 16);
|
||||
$this->decryptIV = mcrypt_generic($this->ecb, $this->decryptIV);
|
||||
}
|
||||
|
||||
if (strlen($ciphertext) & 0xF) {
|
||||
$this->decryptIV = mcrypt_generic($this->ecb, $this->decryptIV);
|
||||
$buffer = substr($ciphertext, $last_pos);
|
||||
$plaintext.= $buffer ^ $this->decryptIV;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user