Skip to content

Commit e0973b4

Browse files
committed
minor refactor
1 parent 1c349a8 commit e0973b4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

core/src/main/java/org/bouncycastle/crypto/digests/SHAKEDigest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,11 @@ public int doFinal(byte[] out, int outOff)
5050

5151
public int doFinal(byte[] out, int outOff, int outLen)
5252
{
53-
if (!squeezing)
54-
{
55-
absorb(new byte[]{0x0F}, 0, 4);
56-
}
57-
58-
squeeze(out, outOff, ((long)outLen) * 8);
53+
int length = doOutput(out, outOff, outLen);
5954

6055
reset();
6156

62-
return outLen;
57+
return length;
6358
}
6459

6560
public int doOutput(byte[] out, int outOff, int outLen)

0 commit comments

Comments
 (0)