cryptohash-0.11.9: 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

- newtype Ctx = Ctx ByteString
- init :: Ctx
- init_t :: Int -> Ctx
- update :: Ctx -> ByteString -> Ctx
- updates :: Ctx -> [ByteString] -> Ctx
- finalize :: Ctx -> ByteString
- hash :: ByteString -> ByteString
- hashlazy :: ByteString -> ByteString

# Documentation

newtype Ctx Source #

SHA512 Context

Constructors

Ctx ByteString |

# Incremental hashing Functions

init :: Ctx Source #

init a context

init_t :: Int -> Ctx Source #

init a context using FIPS 180-4 for truncated SHA512

update :: Ctx -> ByteString -> Ctx Source #

update a context with a bytestring

updates :: Ctx -> [ByteString] -> Ctx Source #

updates a context with multiples bytestring

finalize :: Ctx -> ByteString Source #

finalize the context into a digest bytestring

# Single Pass hashing

hash :: ByteString -> ByteString Source #

hash a strict bytestring into a digest bytestring

hashlazy :: ByteString -> ByteString Source #

hash a lazy bytestring into a digest bytestring