MCPcopy Create free account
hub / github.com/cloudflare/computer / sha256

Function sha256

packages/dofs/src/fs/writeFile.ts:85–89  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

83// VirtualProvider). node:crypto is available natively on Node and
84// polyfilled by workerd.
85function sha256(bytes: Uint8Array): Uint8Array {
86 const hash = createHash("sha256");
87 hash.update(bytes);
88 return new Uint8Array(hash.digest());
89}
90
91interface PreparedChunk {
92 hash: Uint8Array;

Callers 5

chunksOfFunction · 0.70
flushFunction · 0.70
applyChunkedInodeUpdateFunction · 0.70
commitPendingBufferFunction · 0.70
writeFileRangesSyncFunction · 0.70

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected