From c340d6254870d3d6b35bbe51bf7c2a00916ebd8c Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 19 Dec 2017 07:04:36 -0600 Subject: [PATCH] Crypt: some of the minimum key lengths were off --- phpseclib/Crypt/Blowfish.php | 2 +- phpseclib/Crypt/RC2.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/Blowfish.php b/phpseclib/Crypt/Blowfish.php index 17396658..cc885114 100644 --- a/phpseclib/Crypt/Blowfish.php +++ b/phpseclib/Crypt/Blowfish.php @@ -367,7 +367,7 @@ class Crypt_Blowfish extends Crypt_Base function setKeyLength($length) { if ($length < 32) { - $this->key_length = 7; + $this->key_length = 4; } elseif ($length > 448) { $this->key_length = 56; } else { diff --git a/phpseclib/Crypt/RC2.php b/phpseclib/Crypt/RC2.php index 97b4550c..f88ef9b8 100644 --- a/phpseclib/Crypt/RC2.php +++ b/phpseclib/Crypt/RC2.php @@ -369,7 +369,7 @@ class Crypt_RC2 extends Crypt_Base function setKeyLength($length) { if ($length < 8) { - $this->default_key_length = 8; + $this->default_key_length = 1; } elseif ($length > 1024) { $this->default_key_length = 128; } else {