diff --git a/phpseclib/Crypt/RSA/PrivateKey.php b/phpseclib/Crypt/RSA/PrivateKey.php index 2830d982..5205ce63 100644 --- a/phpseclib/Crypt/RSA/PrivateKey.php +++ b/phpseclib/Crypt/RSA/PrivateKey.php @@ -512,7 +512,7 @@ class PrivateKey extends RSA implements Common\PrivateKey $options+= [ 'hash' => $this->hash->getHash(), 'MGFHash' => $this->mgfHash->getHash(), - 'saltLength' => $this->sLen + 'saltLength' => $this->getSaltLength() ]; } else { throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS'); diff --git a/phpseclib/Crypt/RSA/PublicKey.php b/phpseclib/Crypt/RSA/PublicKey.php index 4a080d7c..3475ad99 100644 --- a/phpseclib/Crypt/RSA/PublicKey.php +++ b/phpseclib/Crypt/RSA/PublicKey.php @@ -475,7 +475,7 @@ class PublicKey extends RSA implements Common\PublicKey $options+= [ 'hash' => $this->hash->getHash(), 'MGFHash' => $this->mgfHash->getHash(), - 'saltLength' => $this->sLen + 'saltLength' => $this->getSaltLength() ]; } else { throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS');