Files
Foundry-VTT-Docker/resources/app/node_modules/@smithy/hash-blob-browser/dist-es/index.js

9 lines
266 B
JavaScript
Raw Normal View History

2025-01-04 00:34:03 +01:00
import { blobReader } from "@smithy/chunked-blob-reader";
export const blobHasher = async function blobHasher(hashCtor, blob) {
const hash = new hashCtor();
await blobReader(blob, (chunk) => {
hash.update(chunk);
});
return hash.digest();
};