This commit is contained in:
Andras Schmelczer 2025-03-15 11:44:56 +00:00
commit 24a8def394
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 7 additions and 3 deletions

View file

@ -6,7 +6,7 @@ export function hash(content: Uint8Array): string {
result = (result << 5) - result + content[i];
result |= 0; // Convert to 32bit integer
}
return Math.abs(result).toString(16);
return Math.abs(result).toString(16).padStart(8, "0");
}
export const EMPTY_HASH = hash(new Uint8Array(0));