summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-04-24 18:14:44 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-04-24 18:14:44 +0700
commit78b79a9ea5e06818702b91b2aca6a83208f9fa5b (patch)
treed161b00131909ded7951c7b70232a0016a5350e3 /crypto/src
parentSparkleDigest perf. opts. (diff)
downloadBouncyCastle.NET-ed25519-78b79a9ea5e06818702b91b2aca6a83208f9fa5b.tar.xz
SparkleDIgest: improved tests and fixed regression
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/digests/SparkleDigest.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/crypto/digests/SparkleDigest.cs b/crypto/src/crypto/digests/SparkleDigest.cs
index 1209d9c58..3729f3ee1 100644
--- a/crypto/src/crypto/digests/SparkleDigest.cs
+++ b/crypto/src/crypto/digests/SparkleDigest.cs
@@ -168,7 +168,7 @@ namespace Org.BouncyCastle.Crypto.Digests
                 state[(STATE_UINTS >> 1) - 1] ^= 1U << 24;
 
                 // padding
-                m_buf[m_bufPos++] = 0x80;
+                m_buf[m_bufPos] = 0x80;
                 while(++m_bufPos < RATE_BYTES)
                 {
                     m_buf[m_bufPos] = 0x00;
@@ -211,7 +211,7 @@ namespace Org.BouncyCastle.Crypto.Digests
                 state[(STATE_UINTS >> 1) - 1] ^= 1U << 24;
 
                 // padding
-                m_buf[m_bufPos++] = 0x80;
+                m_buf[m_bufPos] = 0x80;
                 while(++m_bufPos < RATE_BYTES)
                 {
                     m_buf[m_bufPos] = 0x00;