raaz-0.2.1: The raaz cryptographic library.

Safe Haskell | None
Language | Haskell2010

Raaz.Hash.Sha384

Contents

- The SHA384 cryptographic hash
- HMAC computation using SHA384

Description

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

Synopsis

- data SHA384
- sha384 :: PureByteSource src => src -> SHA384
- sha384File :: FilePath -> IO SHA384
- sha384Source :: ByteSource src => src -> IO SHA384
- hmacSha384 :: PureByteSource src => Key (HMAC SHA384) -> src -> HMAC SHA384
- hmacSha384File :: Key (HMAC SHA384) -> FilePath -> IO (HMAC SHA384)
- hmacSha384Source :: ByteSource src => Key (HMAC SHA384) -> src -> IO (HMAC SHA384)

# The SHA384 cryptographic hash

data SHA384 Source #

The Sha384 hash value.

#### Instances

Instances details

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

Instance details

Defined in Raaz.Hash.Sha384.Internal

Methods

sizeOf :: SHA384 -> Int Source #

alignment :: SHA384 -> Int Source #

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

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

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

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

peek :: Ptr SHA384 -> IO SHA384 Source #

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

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

sha384 :: PureByteSource src => src -> SHA384 Source #

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

sha384File :: FilePath -> IO SHA384 Source #

Compute the sha384 hash of a file.

sha384Source :: ByteSource src => src -> IO SHA384 Source #

Compute the sha384 hash of a general byte source.

# HMAC computation using SHA384

hmacSha384 Source #

Arguments

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

Compute the message authentication code using hmac-sha384.

hmacSha384File Source #

Arguments

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

Compute the message authentication code for a file.

hmacSha384Source :: ByteSource src => Key (HMAC SHA384) -> src -> IO (HMAC SHA384) Source #

Compute the message authetication code for a generic byte source.