MCPcopy
hub / github.com/prisma/prisma / digest

Method digest

helpers/compile/plugins/fill-plugin/fillers/crypto.ts:34–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 }
33
34 async digest(): Promise<Uint8Array> {
35 const data = new Uint8Array(this.#chunks.reduce((acc, chunk) => acc + chunk.length, 0))
36 let offset = 0
37 for (const chunk of this.#chunks) {
38 data.set(chunk, offset)
39 offset += chunk.length
40 }
41 const arrayBuffer = await globalThis.crypto.subtle.digest(this.#algorithm, data)
42 return new Uint8Array(arrayBuffer)
43 }
44}
45
46export default {

Callers 5

getProjectHashFunction · 0.80
getCLIPathHashFunction · 0.80
getUniquePackageNameFunction · 0.80
getHashFunction · 0.80

Calls 1

setMethod · 0.80

Tested by

no test coverage detected