MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / calcComposeHash

Function calcComposeHash

vmm/ui/src/composables/useVmManager.ts:704–710  ·  view source on GitHub ↗
(appCompose: string)

Source from the content-addressed store, hash-verified

702 }
703
704 async function calcComposeHash(appCompose: string) {
705 const buffer = new TextEncoder().encode(appCompose);
706 const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);
707 return Array.from(new Uint8Array(hashBuffer))
708 .map((b) => b.toString(16).padStart(2, '0'))
709 .join('');
710 }
711
712 async function makeAppComposeFile() {
713 const appCompose: Record<string, unknown> = {

Callers 4

makeAppComposeFileFunction · 0.85
makeUpdateComposeFileFunction · 0.85
useVmManagerFunction · 0.85
calcAppIdFunction · 0.85

Calls 2

digestMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected