diff options
author | David Hook <dgh@bouncycastle.org> | 2015-12-19 11:08:12 +1100 |
---|---|---|
committer | David Hook <dgh@bouncycastle.org> | 2015-12-19 11:08:12 +1100 |
commit | 9edba71a655a0df5f39e1cef3632bb9561bae6ae (patch) | |
tree | 6d29c99a9fbd67b20f8d8b9cf610e2afa4b084da | |
parent | Added test against fixed salt. (diff) | |
download | BouncyCastle.NET-ed25519-9edba71a655a0df5f39e1cef3632bb9561bae6ae.tar.xz |
Added use of standard salt if provided.
-rw-r--r-- | crypto/src/crypto/signers/Iso9796d2PssSigner.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/crypto/signers/Iso9796d2PssSigner.cs b/crypto/src/crypto/signers/Iso9796d2PssSigner.cs index fb117c19d..3aa2e3719 100644 --- a/crypto/src/crypto/signers/Iso9796d2PssSigner.cs +++ b/crypto/src/crypto/signers/Iso9796d2PssSigner.cs @@ -486,7 +486,14 @@ namespace Org.BouncyCastle.Crypto.Signers digest.BlockUpdate(m2Hash, 0, m2Hash.Length); // Update for the salt - digest.BlockUpdate(block, mStart + recoveredMessage.Length, saltLength); + if (standardSalt != null) + { + digest.BlockUpdate(standardSalt, 0, standardSalt.Length); + } + else + { + digest.BlockUpdate(block, mStart + recoveredMessage.Length, saltLength); + } byte[] hash = new byte[digest.GetDigestSize()]; digest.DoFinal(hash, 0); |