dhall-1.42.2: A configuration language guaranteed to terminate

Safe Haskell | None
Language | Haskell2010

Dhall.Crypto

Description

This module provides implementations of cryptographic utilities that only work for GHC (as opposed to GHCJS)

Synopsis

- newtype SHA256Digest = SHA256Digest {
  - unSHA256Digest :: ByteString
  }
- sha256DigestFromByteString :: ByteString -> Maybe SHA256Digest
- sha256Hash :: ByteString -> SHA256Digest
- toString :: SHA256Digest -> String

# Documentation

newtype SHA256Digest #

A SHA256 digest

Constructors

SHA256Digest |
Fields unSHA256Digest :: ByteString

#### Instances

Instances details

NFData SHA256Digest # |
Instance details Defined in Dhall.Crypto Methods rnf :: SHA256Digest -> () #
Data SHA256Digest # |
Instance details Defined in Dhall.Crypto Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SHA256Digest -> c SHA256Digest # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SHA256Digest # toConstr :: SHA256Digest -> Constr # dataTypeOf :: SHA256Digest -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SHA256Digest) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SHA256Digest) # gmapT :: (forall b. Data b => b -> b) -> SHA256Digest -> SHA256Digest # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SHA256Digest -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SHA256Digest -> r # gmapQ :: (forall d. Data d => d -> u) -> SHA256Digest -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SHA256Digest -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SHA256Digest -> m SHA256Digest # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SHA256Digest -> m SHA256Digest # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SHA256Digest -> m SHA256Digest #
Generic SHA256Digest # |
Instance details Defined in Dhall.Crypto Associated Types
type Rep SHA256Digest |
Instance details Defined in Dhall.Crypto type Rep SHA256Digest = D1 ('MetaData "SHA256Digest" "Dhall.Crypto" "dhall-1.42.2-AALQHV4FhMB9Vlk0NyXwcC" 'True) (C1 ('MetaCons "SHA256Digest" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSHA256Digest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))
Methods from :: SHA256Digest -> Rep SHA256Digest x # to :: Rep SHA256Digest x -> SHA256Digest #
Show SHA256Digest # |
Instance details Defined in Dhall.Crypto Methods showsPrec :: Int -> SHA256Digest -> ShowS # show :: SHA256Digest -> String # showList :: [SHA256Digest] -> ShowS #
Eq SHA256Digest # |
Instance details Defined in Dhall.Crypto Methods (==) :: SHA256Digest -> SHA256Digest -> Bool # (/=) :: SHA256Digest -> SHA256Digest -> Bool #
Ord SHA256Digest # |
Instance details Defined in Dhall.Crypto Methods compare :: SHA256Digest -> SHA256Digest -> Ordering # (<) :: SHA256Digest -> SHA256Digest -> Bool # (<=) :: SHA256Digest -> SHA256Digest -> Bool # (>) :: SHA256Digest -> SHA256Digest -> Bool # (>=) :: SHA256Digest -> SHA256Digest -> Bool # max :: SHA256Digest -> SHA256Digest -> SHA256Digest # min :: SHA256Digest -> SHA256Digest -> SHA256Digest #
type Rep SHA256Digest # |
Instance details Defined in Dhall.Crypto type Rep SHA256Digest = D1 ('MetaData "SHA256Digest" "Dhall.Crypto" "dhall-1.42.2-AALQHV4FhMB9Vlk0NyXwcC" 'True) (C1 ('MetaCons "SHA256Digest" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSHA256Digest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

sha256DigestFromByteString :: ByteString -> Maybe SHA256Digest #

Attempt to interpret a `ByteString` as a `SHA256Digest`, returning `Nothing` if the conversion fails

sha256Hash :: ByteString -> SHA256Digest #

Hash a `ByteString` and return the hash as a `SHA256Digest`

toString :: SHA256Digest -> String #

`String` representation of a `SHA256Digest`