module Network.AWS.Data.Crypto
(
digestToBS
, digestToBase
, hmacSHA1
, hmacSHA256
, hashSHA256
, hashMD5
, hash
, hashlazy
, hashInit
, hashUpdate
, hashFinalize
, HMAC
, Digest
, HashAlgorithm
, SHA256 (..)
, MD5 (..)
, Base (..)
) where
import "cryptonite" Crypto.Hash
import "cryptonite" Crypto.MAC.HMAC
import Data.ByteArray
import Data.ByteArray.Encoding
import Data.ByteString (ByteString)
digestToBS :: ByteArrayAccess a => a -> ByteString
digestToBS = convert
digestToBase :: ByteArrayAccess a => Base -> a -> ByteString
digestToBase = convertToBase
hmacSHA1 :: (ByteArrayAccess a, ByteArray b) => a -> b -> HMAC SHA1
hmacSHA1 = hmac
hmacSHA256 :: (ByteArrayAccess a, ByteArray b) => a -> b -> HMAC SHA256
hmacSHA256 = hmac
hashSHA256 :: ByteArrayAccess a => a -> Digest SHA256
hashSHA256 = hashWith SHA256
hashMD5 :: ByteArrayAccess a => a -> Digest MD5
hashMD5 = hashWith MD5