Skip to content

Commit

Permalink
Update SM4.cs
Browse files Browse the repository at this point in the history
modify i to j
  • Loading branch information
njk888 authored Dec 21, 2023
1 parent 97de2ed commit b96e74f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SM2Crypto/Lib/SM4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public byte[] sm4_crypt_cbc(SM4_Context ctx, byte[] iv, byte[] input)
byte[] outBytes = new byte[16];
byte[] out1 = new byte[16];

Array.Copy(bins, i * 16, inBytes, 0, length > 16 ? 16 : length);
Array.Copy(bins, j * 16, inBytes, 0, length > 16 ? 16 : length);
for (i = 0; i < 16; i++)
{
outBytes[i] = ((byte)(inBytes[i] ^ iv[i]));
Expand Down

0 comments on commit b96e74f

Please sign in to comment.