mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-06 05:58:53 +01:00
RSA: the salt length isn't saved for new keys
This commit is contained in:
parent
3e32d5a853
commit
c1b70c21cb
@ -512,7 +512,7 @@ class PrivateKey extends RSA implements Common\PrivateKey
|
|||||||
$options+= [
|
$options+= [
|
||||||
'hash' => $this->hash->getHash(),
|
'hash' => $this->hash->getHash(),
|
||||||
'MGFHash' => $this->mgfHash->getHash(),
|
'MGFHash' => $this->mgfHash->getHash(),
|
||||||
'saltLength' => $this->sLen
|
'saltLength' => $this->getSaltLength()
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS');
|
throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS');
|
||||||
|
@ -475,7 +475,7 @@ class PublicKey extends RSA implements Common\PublicKey
|
|||||||
$options+= [
|
$options+= [
|
||||||
'hash' => $this->hash->getHash(),
|
'hash' => $this->hash->getHash(),
|
||||||
'MGFHash' => $this->mgfHash->getHash(),
|
'MGFHash' => $this->mgfHash->getHash(),
|
||||||
'saltLength' => $this->sLen
|
'saltLength' => $this->getSaltLength()
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS');
|
throw new UnsupportedFormatException('The PSS format can only be used when the signature method has been explicitly set to PSS');
|
||||||
|
Loading…
Reference in New Issue
Block a user