Fix lint errors
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Jack Hadrill 2022-01-30 00:07:23 +00:00
parent 19a2481c13
commit 6d5cbf5a32

View File

@ -271,6 +271,8 @@ export function cryptoAeadDecrypt (ciphertext: number[], associatedData: number[
ciphertext.length -= 16
let state = zeroedBuffer(16)
let counter = resetCounter()
if (ciphertext.length !== 0) {
state = [...authenticationTag]
const parsedCiphertext = parse(ciphertext, 16)
@ -278,8 +280,6 @@ export function cryptoAeadDecrypt (ciphertext: number[], associatedData: number[
const finalCiphertextBlockLength = parsedCiphertext[parsedCiphertextLength].length
parsedCiphertext[parsedCiphertextLength] = pad(parsedCiphertext[parsedCiphertextLength], 16)
var counter = resetCounter()
for (let i = 1; i < parsedCiphertextLength + 1; i++) {
state = skinnyEncrypt(state, tweakeyEncode(counter, 4, nonce, key))
let mBlock