talira

cryptohash-sha256

Fast, pure and practical SHA-256 for Haskell

open sourcecryptohash-sha256 BSD 3-clause licencefree

cryptohash-sha256 is a Haskell package for SHA-256 hashing, with an incremental and a one-pass pure API. Its core is written in C, so it runs about as fast as the sha256sum tool, and it also provides HMAC-SHA-256 and HKDF-SHA-256. It began as a fork of the deprecated cryptohash package and is a drop-in replacement for its Crypto.Hash.SHA256 module, depending only on base and bytestring.

Problems it solves

  • hash data with SHA-256 in Haskell without pulling in a large crypto library
  • compute an HMAC-SHA-256 signature in Haskell
  • replace the deprecated cryptohash package's SHA-256 module

Features

  • incremental and one-pass pure SHA-256 API
  • core SHA-256 in C
  • HMAC-SHA-256
  • HKDF-SHA-256
  • drop-in replacement for cryptohash's Crypto.Hash.SHA256

Alternatives

The same job

These do what cryptohash-sha256 does.

  1. crypton Low-level cryptography library for Haskell, the maintained fork of cryptonite
  2. hashable A Haskell class for types that can be hashed

Compare cryptohash-sha256 with the top 3