MCPcopy Create free account
hub / github.com/Noumena-Network/code / generateContentHash

Function generateContentHash

src/utils/plugins/mcpbHandler.ts:93–95  ·  view source on GitHub ↗

* Generate content hash for an MCPB file

(data: Uint8Array)

Source from the content-addressed store, hash-verified

91 * Generate content hash for an MCPB file
92 */
93function generateContentHash(data: Uint8Array): string {
94 return createHash('sha256').update(data).digest('hex').substring(0, 16)
95}
96
97/**
98 * Get cache directory for MCPB files

Callers 1

loadMcpbFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected