MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / sha256Hex

Function sha256Hex

runtime/src/specs.js:8–11  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

6export const SOURCE_LIMIT = 1 << 20;
7
8export const sha256Hex = async (bytes) => {
9 const digest = await crypto.subtle.digest('SHA-256', bytes);
10 return [...new Uint8Array(digest)].map(b => b.toString(16).padStart(2, '0')).join('');
11};
12
13export const dirOf = (spec) => {
14 const i = spec.lastIndexOf('/');

Callers 1

fetchWithLockfileFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected