1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-04 10:38:12 +01:00

RSA: the salt length isn't saved for new keys

This commit is contained in:
terrafrost 2021-01-16 09:59:45 -06:00
parent 3e32d5a853
commit c1b70c21cb
2 changed files with 2 additions and 2 deletions

View File

@ -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');

View File

@ -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');