django-vue3-admin-web/node_modules/@smithy/hash-blob-browser/dist-es/index.js
2025-10-20 21:21:14 +08:00

9 lines
266 B
JavaScript

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();
};