raaz-0.2.1: The raaz cryptographic library.

Safe Haskell | None
Language | Haskell2010

Raaz.Hash.Sha224

Contents

- The SHA224 cryptographic hash
- HMAC computation using SHA224

Description

This module exposes combinators to compute the SHA224 hash and the associated HMAC for some common types.

Synopsis

- data SHA224
- sha224 :: PureByteSource src => src -> SHA224
- sha224File :: FilePath -> IO SHA224
- sha224Source :: ByteSource src => src -> IO SHA224
- hmacSha224 :: PureByteSource src => Key (HMAC SHA224) -> src -> HMAC SHA224
- hmacSha224File :: Key (HMAC SHA224) -> FilePath -> IO (HMAC SHA224)
- hmacSha224Source :: ByteSource src => Key (HMAC SHA224) -> src -> IO (HMAC SHA224)

# The SHA224 cryptographic hash

data SHA224 Source #

Sha224 hash value which consist of 7 32bit words.

Instances

Eq SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Methods (==) :: SHA224 -> SHA224 -> Bool Source # (/=) :: SHA224 -> SHA224 -> Bool Source #
Show SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Methods showsPrec :: Int -> SHA224 -> ShowS Source # show :: SHA224 -> String Source # showList :: [SHA224] -> ShowS Source #
IsString SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Methods fromString :: String -> SHA224 Source #
Storable SHA224 Source # |

Instance details

Defined in Raaz.Hash.Sha224.Internal

Methods

sizeOf :: SHA224 -> Int Source #

alignment :: SHA224 -> Int Source #

peekElemOff :: Ptr SHA224 -> Int -> IO SHA224 Source #

pokeElemOff :: Ptr SHA224 -> Int -> SHA224 -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO SHA224 Source #

pokeByteOff :: Ptr b -> Int -> SHA224 -> IO () Source #

peek :: Ptr SHA224 -> IO SHA224 Source #

poke :: Ptr SHA224 -> SHA224 -> IO () Source #

Equality SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Methods eq :: SHA224 -> SHA224 -> Result Source #
EndianStore SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Methods store :: Ptr SHA224 -> SHA224 -> IO () Source # load :: Ptr SHA224 -> IO SHA224 Source # adjustEndian :: Ptr SHA224 -> Int -> IO () Source #
Encodable SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Methods toByteString :: SHA224 -> ByteString Source # fromByteString :: ByteString -> Maybe SHA224 Source # unsafeFromByteString :: ByteString -> SHA224 Source #
Recommendation SHA224 Source # | Recommended implementation for SHA224.
Instance details Defined in Raaz.Hash.Sha224.Recommendation Methods recommended :: SHA224 -> Implementation SHA224 Source #
Primitive SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Associated Types type Implementation SHA224 :: Type Source # Methods blockSize :: SHA224 -> BYTES Int Source #
Hash SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal Methods additionalPadBlocks :: SHA224 -> BLOCKS SHA224 Source #
type Implementation SHA224 Source # |
Instance details Defined in Raaz.Hash.Sha224.Internal type Implementation SHA224 = SomeHashI SHA224

sha224 :: PureByteSource src => src -> SHA224 Source #

Compute the sha224 hash of an instance of `PureByteSource`. Use this for computing the sha224 hash of a strict or lazy byte string.

sha224File :: FilePath -> IO SHA224 Source #

Compute the sha224 hash of a file.

sha224Source :: ByteSource src => src -> IO SHA224 Source #

Compute the sha224 hash of a general byte source.

# HMAC computation using SHA224

hmacSha224 Source #

Arguments

:: PureByteSource src |
=> Key (HMAC SHA224) | Key to use
-> src | pure source whose hmac is to be computed
-> HMAC SHA224 |

Compute the message authentication code using hmac-sha224.

hmacSha224File Source #

Arguments

:: Key (HMAC SHA224) | Key to use
-> FilePath | File whose hmac is to be computed
-> IO (HMAC SHA224) |

Compute the message authentication code for a file.

hmacSha224Source :: ByteSource src => Key (HMAC SHA224) -> src -> IO (HMAC SHA224) Source #

Compute the message authetication code for a generic byte source.