From 69614034ec225433416edd5a8884035885a78649 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 7 Dec 2014 07:35:30 -0600 Subject: [PATCH] Crypt_Base: fix to the IV handling of the last commit --- phpseclib/Crypt/Base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index e6f57187..693c74f9 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -1327,7 +1327,7 @@ class Crypt_Base $encryptIV = $this->_string_pop($ciphertext, $block_size); } if (!defined('OPENSSL_RAW_DATA')) { - $encryptIV.= openssl_encrypt(str_repeat(chr($this->block_size), $this->block_size), $this->cipher_name_openssl_ecb, $key, $this->openssl_options); + $encryptIV.= openssl_encrypt('', $this->cipher_name_openssl_ecb, $key, $this->openssl_options); } $encryptIV = openssl_decrypt($encryptIV, $this->cipher_name_openssl_ecb, $key, $this->openssl_options); if ($overflow) {