fix typecheck

This commit is contained in:
mtvpls
2025-12-10 00:46:57 +08:00
parent a5b02ea8d5
commit 0b6723cf45
5 changed files with 19 additions and 11 deletions
+6 -2
View File
@@ -139,8 +139,8 @@ export class AESDecryptor {
const invSubMix2 = invSubMix[2];
const invSubMix3 = invSubMix[3];
let prev;
let t;
let prev: number = 0;
let t: number;
for (ksRow = 0; ksRow < ksRows; ksRow++) {
if (ksRow < keySize) {
@@ -168,6 +168,10 @@ export class AESDecryptor {
t = keySchedule[ksRow - 4];
}
if (t === undefined) {
throw new Error('Invalid key schedule');
}
if (invKsRow < 4 || ksRow <= 4) {
invKeySchedule[invKsRow] = t;
} else {