MCPcopy Create free account
hub / github.com/6174/comflowyspace / verifySHA

Function verifySHA

apps/node/src/modules/utils/sha.ts:24–27  ·  view source on GitHub ↗
(file: string, sha: string)

Source from the content-addressed store, hash-verified

22}
23
24export async function verifySHA(file: string, sha: string): Promise<boolean> {
25 const hash = await calculateSHA(file);
26 return hash.toLocaleLowerCase() === sha.toLocaleLowerCase();
27}
28
29// calculateSHA('~/comfyui/models/loras/xx.safetensors.tmp')
30// .then((hash) => {

Callers 1

downloadUrlProFunction · 0.90

Calls 1

calculateSHAFunction · 0.85

Tested by

no test coverage detected