raaz-0.2.0: The raaz cryptographic library.

Safe HaskellNone
LanguageHaskell2010

Raaz.Hash.Sha512

Contents

Description

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

Synopsis

The SHA512 cryptographic hash

data SHA512 Source #

The Sha512 hash value. Used in implementation of Sha384 as well.

sha512 :: PureByteSource src => src -> SHA512 Source #

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

sha512File :: FilePath -> IO SHA512 Source #

Compute the sha512 hash of a file.

sha512Source :: ByteSource src => src -> IO SHA512 Source #

Compute the sha512 hash of a general byte source.

HMAC computation using SHA512

hmacSha512 Source #

Arguments

:: PureByteSource src 
=> Key (HMAC SHA512)

Key to use

-> src

pure source whose hmac is to be computed

-> HMAC SHA512 

Compute the message authentication code using hmac-sha512.

hmacSha512File Source #

Arguments

:: Key (HMAC SHA512)

Key to use

-> FilePath

File whose hmac is to be computed

-> IO (HMAC SHA512) 

Compute the message authentication code for a file.

hmacSha512Source :: ByteSource src => Key (HMAC SHA512) -> src -> IO (HMAC SHA512) Source #

Compute the message authetication code for a generic byte source.