diff options
author | ZZMarquis <zhonglingjian3821@163.com> | 2018-03-24 08:27:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-24 08:27:04 +0800 |
commit | f8d6ad7091914ba3ba518e1f1f49d7ec66b3f2d6 (patch) | |
tree | 6790ef1c30aa9f92635704d151d6b626ad7db618 | |
parent | Reformat (diff) | |
download | BouncyCastle.NET-ed25519-f8d6ad7091914ba3ba518e1f1f49d7ec66b3f2d6.tar.xz |
if the parameter "inOff" in Decrypt() is not zero, it can not be decrypted as excepted
if the parameter "inOff" in Decrypt() is not zero, it can not be decrypted as excepted
-rw-r--r-- | crypto/src/crypto/engines/SM2Engine.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/crypto/engines/SM2Engine.cs b/crypto/src/crypto/engines/SM2Engine.cs index e5f12bbbb..90a5e4d6f 100644 --- a/crypto/src/crypto/engines/SM2Engine.cs +++ b/crypto/src/crypto/engines/SM2Engine.cs @@ -139,7 +139,7 @@ namespace Org.BouncyCastle.Crypto.Engines int check = 0; for (int i = 0; i != c3.Length; i++) { - check |= c3[i] ^ input[c1.Length + c2.Length + i]; + check |= c3[i] ^ input[inOff + c1.Length + c2.Length + i]; } Arrays.Fill(c1, 0); |