Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <[email protected]> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Network.AWS.Data.Crypto
Description
- digestToBS :: ByteArrayAccess a => a -> ByteString
- digestToBase :: ByteArrayAccess a => Base -> a -> ByteString
- hmacSHA256 :: (ByteArrayAccess a, ByteArray b) => a -> b -> HMAC SHA256
- hashSHA256 :: ByteArrayAccess a => a -> Digest SHA256
- hashMD5 :: ByteArrayAccess a => a -> Digest MD5
- hash :: (ByteArrayAccess ba, HashAlgorithm a) => ba -> Digest a
- hashlazy :: HashAlgorithm a => ByteString -> Digest a
- hashInit :: HashAlgorithm a => Context a
- hashUpdate :: (ByteArrayAccess ba, HashAlgorithm a) => Context a -> ba -> Context a
- hashFinalize :: HashAlgorithm a => Context a -> Digest a
- data HMAC a :: * -> *
- data Digest a :: * -> *
- class HashAlgorithm a
- data SHA256 :: * = SHA256
- data MD5 :: * = MD5
- data Base :: *
Conversion
digestToBS :: ByteArrayAccess a => a -> ByteString Source
digestToBase :: ByteArrayAccess a => Base -> a -> ByteString Source
Algorithms
hmacSHA256 :: (ByteArrayAccess a, ByteArray b) => a -> b -> HMAC SHA256 Source
hashSHA256 :: ByteArrayAccess a => a -> Digest SHA256 Source
hashMD5 :: ByteArrayAccess a => a -> Digest MD5 Source
Contexts
hash :: (ByteArrayAccess ba, HashAlgorithm a) => ba -> Digest a
Hash a strict bytestring into a digest.
hashlazy :: HashAlgorithm a => ByteString -> Digest a
Hash a lazy bytestring into a digest.
hashInit :: HashAlgorithm a => Context a
Initialize a new context for this hash algorithm
hashUpdate :: (ByteArrayAccess ba, HashAlgorithm a) => Context a -> ba -> Context a
run hashUpdates on one single bytestring and return the updated context.
hashFinalize :: HashAlgorithm a => Context a -> Digest a
Finalize a context and return a digest.
Re-exported
data HMAC a :: * -> *
Represent an HMAC that is a phantom type with the hash used to produce the mac.
The Eq instance is constant time.
Instances
Eq (HMAC a) | |
ByteArrayAccess (HMAC a) |
data Digest a :: * -> *
Represent a digest for a given hash algorithm.
class HashAlgorithm a
Class representing hashing algorithms.
The interface presented here is update in place and lowlevel. the Hash module takes care of hidding the mutable interface properly.
Minimal complete definition
hashBlockSize, hashDigestSize, hashInternalContextSize, hashInternalInit, hashInternalUpdate, hashInternalFinalize
Instances