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

Function generateEmptyIntegrityBlock

go/integrityblock/integrityblock.go:100–109  ·  view source on GitHub ↗

generateEmptyIntegrityBlock creates an empty integrity block which does not have any integrity signatures in the signature stack yet.

()

Source from the content-addressed store, hash-verified

98
99// generateEmptyIntegrityBlock creates an empty integrity block which does not have any integrity signatures in the signature stack yet.
100func generateEmptyIntegrityBlock() *IntegrityBlock {
101 var integritySignatures []*IntegritySignature
102
103 integrityBlock := &IntegrityBlock{
104 Magic: IntegrityBlockMagic,
105 Version: VersionB1,
106 SignatureStack: integritySignatures,
107 }
108 return integrityBlock
109}
110
111// readWebBundlePayloadLength returns the length of the web bundle parsed from the last 8 bytes of the web bundle file.
112// [Web Bundle's Trailing Length]: https://wpack-wg.github.io/bundled-responses/draft-ietf-wpack-bundled-responses.html#name-trailing-length

Calls

no outgoing calls