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

Portability | unknown
Stability | experimental
Maintainer | Vincent Hanquez <vincent@snarc.org>
Safe Haskell | Trustworthy

Crypto.Hash.SHA1

Contents

- Incremental hashing Functions
- Single Pass hashing

Description

A module containing SHA1 bindings

Synopsis

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

# Documentation

newtype Ctx Source

SHA1 Context

Constructors

Ctx ByteString |

# Incremental hashing Functions

init :: Ctx Source

init a context

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