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; } /**