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.SHA3

Contents

- Incremental hashing Functions
- Single Pass hashing

Description

Warning: this implementation is not SHA3 as standardized, but SHA3 as submitted before standardisation (Keccak)

A module containing SHA3 bindings

WARNING: this implementation is not SHA3 as standardize, but SHA3 as submitted before standardisation. also known at the Keccak.

A matching implementation is available as Keccak in cryptonite for people that are using the pre-standard SHA3.

do not use.

Synopsis

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

# Documentation

newtype Ctx #

SHA3 Context

Constructors

Ctx ByteString |

# Incremental hashing Functions

init :: Int -> Ctx #

init a context

update :: Ctx -> ByteString -> Ctx #

update a context with a bytestring

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

updates a context with multiples bytestring

finalize :: Ctx -> ByteString #

finalize the context into a digest bytestring

# Single Pass hashing

hash :: Int -> ByteString -> ByteString #

hash a strict bytestring into a digest bytestring

hashlazy :: Int -> ByteString -> ByteString #

hash a lazy bytestring into a digest bytestring