Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Hash = Sha256 {}
- parseSha256 :: ByteString -> Maybe Hash
- formatHash :: Hash -> ByteString
- type HashType = Text
- data Hashed v = Hashed {
- hashedValue :: v
- hashOf :: Hash
- calcHashed :: ByteString -> (v -> HashType) -> (ByteString -> Maybe v) -> Maybe (Hashed v)
Documentation
parseSha256 :: ByteString -> Maybe Hash Source #
Decodes a SHA256 hash, which is base64 encoded.
formatHash :: Hash -> ByteString Source #
Formats a hash as a base64 encoded string.
A value accompanied with the hash of the ByteString that it was deserialized from.
Hashed | |
|
calcHashed :: ByteString -> (v -> HashType) -> (ByteString -> Maybe v) -> Maybe (Hashed v) Source #