diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-17 18:50:15 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-17 18:50:15 +0700 |
commit | e62e8ba79235e3fb55281d329ceeb1774bc8aea9 (patch) | |
tree | 187be2f1cbd0a59beaca8d7a204b3ca256fc04fa /crypto/src | |
parent | Refactor away redundant method (diff) | |
download | BouncyCastle.NET-ed25519-e62e8ba79235e3fb55281d329ceeb1774bc8aea9.tar.xz |
Remove unused digest
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs b/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs index 56f3cda48..f477608a6 100644 --- a/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs +++ b/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs @@ -1,6 +1,5 @@ - using System; -using System.Security.Cryptography; + using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Generators; @@ -118,7 +117,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus : SPHINCSPlusEngine { private byte[] padding = new byte[128]; - private IDigest treeDigest; private HMac treeHMac; private Mgf1BytesGenerator mgf1; private byte[] hmacBuf; @@ -133,8 +131,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus { sha256 = new Sha256Digest(); sha256Buf = new byte[sha256.GetDigestSize()]; - - this.treeDigest = new Sha256Digest(); + if (n == 16) { this.msgDigest = new Sha256Digest(); @@ -152,7 +149,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus this.hmacBuf = new byte[treeHMac.GetMacSize()]; this.msgDigestBuf = new byte[msgDigest.GetDigestSize()]; - } public override byte[] F(byte[] pkSeed, Adrs adrs, byte[] m1) |