From ee84c4b41d64e58d851236b36c6ddf82b16074ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans-J=C3=BCrgen=20Petrich?= Date: Wed, 6 Mar 2013 18:14:27 +0700 Subject: [PATCH] $plaintext should be $ciphertext --- phpseclib/Crypt/DES.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Crypt/DES.php b/phpseclib/Crypt/DES.php index 0b353b87..a4b3e541 100644 --- a/phpseclib/Crypt/DES.php +++ b/phpseclib/Crypt/DES.php @@ -846,7 +846,7 @@ class Crypt_DES { $xor = $this->decryptIV; if (strlen($buffer['xor'])) { for ($i = 0; $i < strlen($ciphertext); $i+=8) { - $block = substr($plaintext, $i, 8); + $block = substr($ciphertext, $i, 8); if (strlen($block) > strlen($buffer['xor'])) { $xor = $this->_processBlock($xor, CRYPT_DES_ENCRYPT); $buffer['xor'].= $xor;