diff --git a/src/components/renderer/SvgRenderer.tsx b/src/components/renderer/SvgRenderer.tsx index c307447..5e9a867 100644 --- a/src/components/renderer/SvgRenderer.tsx +++ b/src/components/renderer/SvgRenderer.tsx @@ -51,7 +51,15 @@ export const SvgRenderer: FunctionComponent = ({ try { const response = await fetch(svgOrUrl); const blob = await response.blob(); - setBuffer(await blob.arrayBuffer()); + let shaDigest; + const svgUint8Array = new Uint8Array(buffer ?? []); + import("multiformats/hashes/sha2").then(({ sha256 }) => { + shaDigest = sha256.digest(svgUint8Array) as Promise>; + shaDigest.then((res: any) => { + console.log("sha result is ", res); + }); + }); + // setBuffer(await blob.arrayBuffer()); } catch (error) { setIsError(true); }