Skip to content

Commit 701686c

Browse files
committed
fixed one off error in G3413CTRBlockCipher
1 parent 1b6a3dc commit 701686c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

core/src/main/java/org/bouncycastle/crypto/modes/G3413CTRBlockCipher.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public void init(
7373
CipherParameters params)
7474
throws IllegalArgumentException
7575
{
76-
7776
if (params instanceof ParametersWithIV)
7877
{
7978
ParametersWithIV ivParam = (ParametersWithIV)params;
@@ -92,7 +91,7 @@ public void init(
9291
{
9392
CTR[i] = 0;
9493
}
95-
94+
9695
// if null it's an IV changed only.
9796
if (ivParam.getParameters() != null)
9897
{
@@ -198,7 +197,6 @@ private void generateCTR()
198197
{
199198
throw new IllegalStateException("attempt to process too many blocks");
200199
}
201-
CTR[start]++;
202200
}
203201
}
204202

core/src/test/java/org/bouncycastle/crypto/test/GOST3412Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public String getName()
8787
public void performTest()
8888
throws Exception
8989
{
90-
//super.performTest();
90+
super.performTest();
9191

9292
ctrTest();
9393
// cfbTest();

0 commit comments

Comments
 (0)