WRITE UNIT TESTS!!!

first async command working, no unit tests done AGAING
This commit is contained in:
2026-08-23 06:39:37 +02:00
parent e313aa5b9d
commit 268729bb62
18 changed files with 331 additions and 93 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
import { MD5 } from "./hash";
/* import { MD5 } from "./hash";
//INDEXED DB IS SO FUCKING DOGSHIT ITS INSANE
@@ -71,3 +71,4 @@ function isChecksumMatching(json: string, checksum: string): boolean {
const resourceChksm = MD5.hash(json);
return resourceChksm === checksum;
}
*/
+3 -3
View File
@@ -52,7 +52,7 @@ export class MD5 {
return (b & d) | (c & ~d);
}
let AA = A,
const AA = A,
BB = B,
CC = C,
DD = D;
@@ -129,7 +129,7 @@ export class MD5 {
return new Uint8Array([...out, ...zeroArray, ...lengthBytes]);
}
private static sliceToBlocks(input: Uint8Array): number[][] {
/* private static sliceToBlocks(input: Uint8Array): number[][] {
const blocks: number[][] = [];
for (let i = 0; i < input.length; i += 64) {
@@ -138,7 +138,7 @@ export class MD5 {
}
return blocks;
}
} */
private static sliceToWords(block: Uint8Array): number[] {
const words: number[] = new Array<number>(16);