dhall-1.32.0: 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

# Documentation

newtype SHA256Digest Source #

A SHA256 digest

Constructors

SHA256Digest |

Fields

- unSHA256Digest :: ByteString

#### Instances

Instances details

Eq SHA256Digest Source # |
Instance details Defined in Dhall.Crypto Methods (==) :: SHA256Digest -> SHA256Digest -> Bool Source # (/=) :: SHA256Digest -> SHA256Digest -> Bool Source #
Ord SHA256Digest Source # |

Instance details

Defined in Dhall.Crypto

Methods

compare :: SHA256Digest -> SHA256Digest -> Ordering Source #

(<) :: SHA256Digest -> SHA256Digest -> Bool Source #

(<=) :: SHA256Digest -> SHA256Digest -> Bool Source #

(>) :: SHA256Digest -> SHA256Digest -> Bool Source #

(>=) :: SHA256Digest -> SHA256Digest -> Bool Source #

max :: SHA256Digest -> SHA256Digest -> SHA256Digest Source #

min :: SHA256Digest -> SHA256Digest -> SHA256Digest Source #

Show SHA256Digest Source # |
Instance details Defined in Dhall.Crypto Methods showsPrec :: Int -> SHA256Digest -> ShowS Source # show :: SHA256Digest -> String Source # showList :: [SHA256Digest] -> ShowS Source #
Generic SHA256Digest Source # |
Instance details Defined in Dhall.Crypto Associated Types type Rep SHA256Digest :: Type -> Type Source # Methods from :: SHA256Digest -> Rep SHA256Digest x Source # to :: Rep SHA256Digest x -> SHA256Digest Source #
NFData SHA256Digest Source # |
Instance details Defined in Dhall.Crypto Methods rnf :: SHA256Digest -> () Source #
ByteArrayAccess SHA256Digest Source # |
Instance details Defined in Dhall.Crypto Methods length :: SHA256Digest -> Int Source # withByteArray :: SHA256Digest -> (Ptr p -> IO a) -> IO a Source # copyByteArrayToPtr :: SHA256Digest -> Ptr p -> IO () Source #
type Rep SHA256Digest Source # |
Instance details Defined in Dhall.Crypto type Rep SHA256Digest = D1 ('MetaData "SHA256Digest" "Dhall.Crypto" "dhall-1.32.0-8h62pP4EsmJ9qkPjREfsUQ" 'True) (C1 ('MetaCons "SHA256Digest" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSHA256Digest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

sha256DigestFromByteString :: ByteString -> Maybe SHA256Digest Source #

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

sha256Hash :: ByteString -> SHA256Digest Source #

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