WRITE UNIT TESTS!!!
first async command working, no unit tests done AGAING
This commit is contained in:
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user