Crypto.Hash.SHA512

cryptohash-0.7.10: collection of crypto hashes, fast, pure and practical

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | unknown
Safe Haskell | Trustworthy
Language | Haskell98

Crypto.Hash.SHA512

Contents

- Incremental hashing Functions
- Single Pass hashing

Description

A module containing SHA512 bindings

Synopsis

- data Ctx = Ctx !ByteString
- data SHA512
- init :: Ctx
- init_t :: Int -> Ctx
- update :: Ctx -> ByteString -> Ctx
- finalize :: Ctx -> ByteString
- hash :: ByteString -> ByteString
- hashlazy :: ByteString -> ByteString

# Documentation

data Ctx #

Constructors

Ctx !ByteString |

Instances

Hash Ctx SHA512 # |
Methods outputLength :: Tagged * SHA512 BitLength # blockLength :: Tagged * SHA512 BitLength # initialCtx :: Ctx # updateCtx :: Ctx -> ByteString -> Ctx # finalize :: Ctx -> ByteString -> SHA512 # hash :: ByteString -> SHA512 # hash' :: ByteString -> SHA512 #

data SHA512 #

Instances

Eq SHA512 # |
Methods (==) :: SHA512 -> SHA512 -> Bool # (/=) :: SHA512 -> SHA512 -> Bool #
Ord SHA512 # |
Methods compare :: SHA512 -> SHA512 -> Ordering # (<) :: SHA512 -> SHA512 -> Bool # (<=) :: SHA512 -> SHA512 -> Bool # (>) :: SHA512 -> SHA512 -> Bool # (>=) :: SHA512 -> SHA512 -> Bool # max :: SHA512 -> SHA512 -> SHA512 # min :: SHA512 -> SHA512 -> SHA512 #
Show SHA512 # |
Methods showsPrec :: Int -> SHA512 -> ShowS # show :: SHA512 -> String # showList :: [SHA512] -> ShowS #
Serialize SHA512 # |
Methods put :: Putter SHA512 # get :: Get SHA512 #
Hash Ctx SHA512 # |
Methods outputLength :: Tagged * SHA512 BitLength # blockLength :: Tagged * SHA512 BitLength # initialCtx :: Ctx # updateCtx :: Ctx -> ByteString -> Ctx # finalize :: Ctx -> ByteString -> SHA512 # hash :: ByteString -> SHA512 # hash' :: ByteString -> SHA512 #

# Incremental hashing Functions

init :: Ctx #

init a context

init_t :: Int -> Ctx #

init a context using FIPS 180-4 for truncated SHA512

update :: Ctx -> ByteString -> Ctx #

update a context with a bytestring

finalize :: Ctx -> ByteString #

finalize the context into a digest bytestring

# Single Pass hashing

hash :: ByteString -> ByteString #

hash a strict bytestring into a digest bytestring

hashlazy :: ByteString -> ByteString #

hash a lazy bytestring into a digest bytestring