diff options
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/crypto/digests/GOST3411Digest.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/digests/MD2Digest.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/digests/ParallelHash.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/digests/TigerDigest.cs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/crypto/digests/GOST3411Digest.cs b/crypto/src/crypto/digests/GOST3411Digest.cs index 218adf68c..123751baa 100644 --- a/crypto/src/crypto/digests/GOST3411Digest.cs +++ b/crypto/src/crypto/digests/GOST3411Digest.cs @@ -103,7 +103,7 @@ namespace Org.BouncyCastle.Crypto.Digests length--; } - while (length > xBuf.Length) + while (length >= xBuf.Length) { Array.Copy(input, inOff, xBuf, 0, xBuf.Length); diff --git a/crypto/src/crypto/digests/MD2Digest.cs b/crypto/src/crypto/digests/MD2Digest.cs index 6d90f3f9d..f72d08768 100644 --- a/crypto/src/crypto/digests/MD2Digest.cs +++ b/crypto/src/crypto/digests/MD2Digest.cs @@ -159,7 +159,7 @@ namespace Org.BouncyCastle.Crypto.Digests // // process whole words. // - while (length > 16) + while (length >= 16) { Array.Copy(input,inOff,M,0,16); ProcessChecksum(M); diff --git a/crypto/src/crypto/digests/ParallelHash.cs b/crypto/src/crypto/digests/ParallelHash.cs index 7d9be7618..f28795f5a 100644 --- a/crypto/src/crypto/digests/ParallelHash.cs +++ b/crypto/src/crypto/digests/ParallelHash.cs @@ -112,7 +112,7 @@ namespace Org.BouncyCastle.Crypto.Digests if (i < len) { - while (len - i > B) + while (len - i >= B) { compress(inBuf, inOff + i, B); i += B; diff --git a/crypto/src/crypto/digests/TigerDigest.cs b/crypto/src/crypto/digests/TigerDigest.cs index 059232de0..ce9efdbed 100644 --- a/crypto/src/crypto/digests/TigerDigest.cs +++ b/crypto/src/crypto/digests/TigerDigest.cs @@ -644,7 +644,7 @@ namespace Org.BouncyCastle.Crypto.Digests // // process whole words. // - while (length > 8) + while (length >= 8) { ProcessWord(input, inOff); |