From 5f8ca76d0f6cb4c217789513d0f42f36a66c99cc Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 14 Jan 2021 08:11:53 -0600 Subject: [PATCH] RSA: the salt length, if not specified, is the length of the hash --- phpseclib/Crypt/RSA.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 90e4e8df..9ff33e67 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -705,7 +705,7 @@ abstract class RSA extends AsymmetricKey */ public function getSaltLength() { - return $this->sLen; + return $this->sLen !== null ? $this->sLen : $this->hLen; } /**