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

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

A collection of crypto hashes, with a practical incremental and one-pass, pure APIs, with performance close to the fastest implementations available in other languages.

The implementations are made in C with a haskell FFI wrapper that hide the C implementation.

Simple examples using the unified API:

    import Crypto.Hash

    sha1 :: ByteString -> Digest SHA1
    sha1 = hash

    hexSha3_512 :: ByteString -> String
    hexSha3_512 bs = show (hash bs :: Digest SHA3_512)

Simple examples using the module API:

    import qualified Crypto.Hash.SHA1 as SHA1

    main = putStrLn $ show $ SHA1.hash (Data.ByteString.pack [0..255])

    import qualified Crypto.Hash.SHA3 as SHA3

    main = putStrLn $ show $ digest
      where digest = SHA3.finalize ctx
            ctx    = foldl' SHA3.update iCtx (map Data.ByteString.pack [ [1,2,3], [4,5,6] ]
            iCtx   = SHA3.init 224

Signatures

Modules

- Crypto
  Submodules
  - Crypto.Hash
    Submodules
    - Crypto.Hash.MD2
    - Crypto.Hash.MD4
    - Crypto.Hash.MD5
    - Crypto.Hash.RIPEMD160
    - Crypto.Hash.SHA1
    - Crypto.Hash.SHA224
    - Crypto.Hash.SHA256
    - Crypto.Hash.SHA3
    - Crypto.Hash.SHA384
    - Crypto.Hash.SHA512
    - Crypto.Hash.SHA512t
    - Crypto.Hash.Skein256
    - Crypto.Hash.Skein512
    - Crypto.Hash.Tiger
    - Crypto.Hash.Types
    - Crypto.Hash.Whirlpool
  - MAC
    Submodules
    - Crypto.MAC.HMAC