Skip to content

Commit 9544976

Browse files
author
gefeili
committed
Move some dataLimitCounter operation to the base class.
1 parent 6ddc87c commit 9544976

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/java/org/bouncycastle/crypto/engines/AEADBaseEngine.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ protected void setInnerMembers(ProcessingBufferType type, AADOperatorType aadOpe
301301
break;
302302
case AADOperatorType.DATA_LIMIT:
303303
m_aad = new byte[AADBufferSize];
304+
dataLimitCounter = new DataLimitCounter();
304305
aadOperator = new DataLimitAADOperator();
305306
break;
306307
}

core/src/main/java/org/bouncycastle/crypto/engines/AsconAEAD128.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ public AsconAEAD128()
2727
nr = 8;
2828
dsep = -9223372036854775808L; //0x80L << 56
2929
macSizeLowerBound = 4;
30-
dataLimitCounter = new DataLimitCounter();
31-
dataLimitCounter.init(54);
3230
setInnerMembers(ProcessingBufferType.Immediate, AADOperatorType.DataLimit, DataOperatorType.DataLimit);
31+
dataLimitCounter.init(54);
3332
decryptionFailureCounter = new DecryptionFailureCounter();
3433
}
3534

0 commit comments

Comments
 (0)