Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
ProjectM36.HashSecurely
Description
A unified class for walking the database structure to produce a hash used for Merkle trees and validation.
Synopsis
- newtype SecureHash = SecureHash {}
- class HashBytes a where
- data SHash = forall a.HashBytes a => SHash !a
- hashBytesL :: Foldable f => Ctx -> ByteString -> f SHash -> Ctx
- hashTransaction :: Transaction -> Set Transaction -> MerkleHash
- mkDDLHash :: DatabaseContext -> Map RelVarName Relation -> SecureHash
Documentation
newtype SecureHash Source #
Constructors
SecureHash | |
Fields |
Instances
Show SecureHash Source # | |
Defined in ProjectM36.HashSecurely | |
Eq SecureHash Source # | |
Defined in ProjectM36.HashSecurely Methods (==) :: SecureHash -> SecureHash -> Bool Source # (/=) :: SecureHash -> SecureHash -> Bool Source # | |
Serialise SecureHash Source # | |
Defined in ProjectM36.HashSecurely Methods schemaGen :: Proxy SecureHash -> SchemaGen Schema Source # toBuilder :: SecureHash -> Builder Source # extractor :: Extractor SecureHash Source # |
class HashBytes a where Source #
Instances
hashBytesL :: Foldable f => Ctx -> ByteString -> f SHash -> Ctx Source #
hashTransaction :: Transaction -> Set Transaction -> MerkleHash Source #
Hash a transaction within its graph context to create a Merkle hash for it.
mkDDLHash :: DatabaseContext -> Map RelVarName Relation -> SecureHash Source #
Return a hash of just DDL-specific (schema) attributes. This is useful for determining if a client has the appropriate updates needed to work with the current schema.