MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / sha256

Function sha256

apps/kimi-code/scripts/native/package.mjs:26–34  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

24}
25
26async function sha256(path) {
27 return await new Promise((resolveHash, reject) => {
28 const hash = createHash('sha256');
29 const stream = createReadStream(path);
30 stream.on('error', reject);
31 stream.on('data', (chunk) => hash.update(chunk));
32 stream.on('end', () => resolveHash(hash.digest('hex')));
33 });
34}
35
36try {
37 await stat(sourceBinary);

Callers 1

package.mjsFile · 0.70

Calls 2

onMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected