diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-27 22:58:54 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-27 22:58:54 +0700 |
commit | df822be413672da4ddc204b7e8d9d6ab04a13186 (patch) | |
tree | 61a4efef735a26e4c416a37748077593fd0a47e4 /crypto/src | |
parent | Sparkle: Add buffering tests (diff) | |
download | BouncyCastle.NET-ed25519-df822be413672da4ddc204b7e8d9d6ab04a13186.tar.xz |
Sparkle: Fix GetUpdateOutputSize(0) behaviour
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/crypto/engines/SparkleEngine.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/crypto/engines/SparkleEngine.cs b/crypto/src/crypto/engines/SparkleEngine.cs index 4c558b70f..053ca3bb5 100644 --- a/crypto/src/crypto/engines/SparkleEngine.cs +++ b/crypto/src/crypto/engines/SparkleEngine.cs @@ -623,7 +623,7 @@ namespace Org.BouncyCastle.Crypto.Engines public int GetUpdateOutputSize(int len) { // The -1 is to account for the lazy processing of a full buffer - int total = System.Math.Max(0, len - 1); + int total = System.Math.Max(0, len) - 1; switch (m_state) { |