MCPcopy Create free account
hub / github.com/WICG/webpackage / calcWebBundleHash

Function calcWebBundleHash

js/sign/src/utils/utils.ts:179–183  ·  view source on GitHub ↗
(webBundle: Uint8Array)

Source from the content-addressed store, hash-verified

177}
178
179export function calcWebBundleHash(webBundle: Uint8Array): Uint8Array {
180 const hash = crypto.createHash('sha512');
181 const data = hash.update(webBundle);
182 return new Uint8Array(data.digest());
183}
184
185export function generateDataToBeSigned(
186 webBundleHash: Uint8Array,

Callers 3

calcWebBundleHashMethod · 0.90
validateSignaturesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected