Safe Haskell | None |
---|---|
Language | Haskell2010 |
Deprecated: sha1 and its hmac is mostly broken. Avoid if possible
This module exposes combinators to compute the SHA1 hash and the associated HMAC for some common types.
- data SHA1
- sha1 :: PureByteSource src => src -> SHA1
- sha1File :: FilePath -> IO SHA1
- sha1Source :: ByteSource src => src -> IO SHA1
- hmacSha1 :: PureByteSource src => Key (HMAC SHA1) -> src -> HMAC SHA1
- hmacSha1File :: Key (HMAC SHA1) -> FilePath -> IO (HMAC SHA1)
- hmacSha1Source :: ByteSource src => Key (HMAC SHA1) -> src -> IO (HMAC SHA1)
The SHA1 cryptographic hash
The cryptographic hash SHA1.
sha1 :: PureByteSource src => src -> SHA1 Source #
Compute the sha1 hash of an instance of PureByteSource
. Use
this for computing the sha1 hash of a strict or lazy byte string.
sha1Source :: ByteSource src => src -> IO SHA1 Source #
Compute the sha1 hash of a general byte source.
HMAC computation using SHA1
hmacSha1 :: PureByteSource src => Key (HMAC SHA1) -> src -> HMAC SHA1 Source #
Compute the message authentication code using hmac-sha1.
hmacSha1File :: Key (HMAC SHA1) -> FilePath -> IO (HMAC SHA1) Source #
Compute the message authentication code for a file.
hmacSha1Source :: ByteSource src => Key (HMAC SHA1) -> src -> IO (HMAC SHA1) Source #
Compute the message authetication code for a generic byte source.