PBKDF2SHA512: remove redundant Mac.reset() calls

Calls to `Mac.reset()` are not needed after `Mac.doFinal(input)`.
This commit is contained in:
Sean Gilligan 2023-09-16 17:29:35 -07:00 committed by Andreas Schildbach
parent 3023188541
commit 576adf229b

View File

@ -93,10 +93,8 @@ public class PBKDF2SHA512 {
U_XOR = mac.doFinal(baU);
U_LAST = U_XOR;
mac.reset();
} else {
byte[] baU = mac.doFinal(U_LAST);
mac.reset();
for (int k = 0; k < U_XOR.length; k++) {
U_XOR[k] = (byte) (U_XOR[k] ^ baU[k]);