mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-24 16:21:16 +02:00
Huawei: Fix linter
Math.multiplyExact is only available on SDK24 onward. We do not expect an overflow to occur here, since the hashLength is fixed and the outputLength is small (32 on all current calls).
This commit is contained in:
parent
0c22ecdd51
commit
705361ae3a
@ -94,7 +94,7 @@ public class CryptoUtils {
|
||||
int n = (outputLength % hashLen == 0) ? outputLength / hashLen : (outputLength / hashLen) + 1;
|
||||
byte[] hashRound = new byte[0];
|
||||
|
||||
ByteBuffer generatedBytes = ByteBuffer.allocate(Math.multiplyExact(n, hashLen));
|
||||
ByteBuffer generatedBytes = ByteBuffer.allocate(n * hashLen);
|
||||
Mac mac = Mac.getInstance("HmacSHA256");
|
||||
mac.init(pseudoSecretKey);
|
||||
for (int roundNum = 1; roundNum <= n; roundNum++) {
|
||||
|
Loading…
Reference in New Issue
Block a user