module Raaz.Hash.Sha512
(
SHA512
, sha512, sha512File, sha512Source
, hmacSha512, hmacSha512File, hmacSha512Source
) where
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Raaz.Core
import Raaz.Hash.Internal ( hashSource, hash, hashFile )
import Raaz.Hash.Internal.HMAC ( hmacSource, hmac, hmacFile, HMAC )
import Raaz.Hash.Sha512.Internal ( SHA512 )
import Raaz.Hash.Sha512.Recommendation()
sha512 :: PureByteSource src => src -> SHA512
sha512 = hash
{-# SPECIALIZE sha512 :: B.ByteString -> SHA512 #-}
{-# SPECIALIZE sha512 :: L.ByteString -> SHA512 #-}
sha512File :: FilePath -> IO SHA512
sha512File = hashFile
sha512Source :: ByteSource src => src -> IO SHA512
sha512Source = hashSource
hmacSha512 :: PureByteSource src
=> Key (HMAC SHA512)
-> src
-> HMAC SHA512
hmacSha512 = hmac
hmacSha512File :: Key (HMAC SHA512)
-> FilePath
-> IO (HMAC SHA512)
hmacSha512File = hmacFile
hmacSha512Source :: ByteSource src
=> Key (HMAC SHA512)
-> src
-> IO (HMAC SHA512)
hmacSha512Source = hmacSource