From a82dc8e009abacc021647682abcbad1287c04ad9 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 15 May 2020 07:53:14 -0500 Subject: [PATCH] SymmetricKey: ECB doesn't use an IV either --- phpseclib/Crypt/Common/SymmetricKey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Crypt/Common/SymmetricKey.php b/phpseclib/Crypt/Common/SymmetricKey.php index e41af0bc..b28327fe 100644 --- a/phpseclib/Crypt/Common/SymmetricKey.php +++ b/phpseclib/Crypt/Common/SymmetricKey.php @@ -780,7 +780,7 @@ abstract class SymmetricKey */ public function usesIV() { - return $this->mode != self::MODE_GCM; + return $this->mode != self::MODE_GCM && $this->mode != self::MODE_ECB; } /**