# cryptohash-sha256

> Fast, pure and practical SHA-256 for Haskell

Source: https://talira.ai/catalog/cryptohash-sha256-t8mtg448
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / hashing](https://talira.ai/categories/libraries/hashing), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: cryptohash-sha256 BSD 3-clause licence[^1][^2]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (BSD-style).
- Free tier: yes[^1]
- Backed by: [Herbert Valerio Riedel](https://talira.ai/orgs/herbert-valerio-riedel.md)

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.

## Links

- GitHub: https://github.com/haskell-hvr/cryptohash-sha256

## 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

## Trust

Overall: 0.23 out of 1.
Signals: maintenance 0.27, adoption 0.28, momentum 0.02, community 0.34, backing 0.30, extensibility 0.00.

- 25 GitHub stars
- 6 contributors
- backed by Herbert Valerio Riedel

Warnings:

- last commit 7 months ago

## Alternatives

- [crypton](https://talira.ai/catalog/crypton-z1vg0stx.md): Low-level cryptography library for Haskell, the maintained fork of cryptonite
- [hashable](https://talira.ai/catalog/hashable-hwp3n560.md): A Haskell class for types that can be hashed

## Sources

[^1]: https://github.com/haskell-hvr/cryptohash-sha256/blob/master/LICENSE (checked 29 Nov 2026)
[^2]: https://github.com/haskell-hvr/cryptohash-sha256/blob/master/cryptohash-sha256.cabal (checked 29 Nov 2026)
