Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Support for protocols that include a signature
Synopsis
- type family Signed hdr ∷ Type
- class SignedHeader hdr where
- headerSigned ∷ hdr → Signed hdr
Documentation
class SignedHeader hdr where Source #
Header that contain a signed part
This class enforces that signatures are computed over the header only (without the block body). This is important: we must be able to verify the signature in a header without having access to the block (which we download separately). Typically of course the header will contain a hash of the body, so the signature can include the body implicitly.
headerSigned ∷ hdr → Signed hdr Source #
Extract the part of the header that the signature should be computed over