sha256

Pure Haskell SHA-256, HMAC-SHA256 (docs.ppad.tech/sha256).
git clone git://git.ppad.tech/sha256.git
Log | Files | Refs | README | LICENSE

CHANGELOG (2079B)


      1 # Changelog
      2 
      3 - 0.3.2 (2026-02-01)
      4   * The library has been refactored substantially to achieve greater
      5     control over heap allocation, particularly around HMAC calculation.
      6 
      7   * A couple of very low-level functions, '_hmac_rr' and '_hmac_rsb' are
      8     now quietly exported for calculating specialized destructive HMAC
      9     operations, mostly of use to HMAC-DRBG implementations.
     10 
     11   * HMAC performance is also improved, now only about 2x that of hash
     12     computation.
     13 
     14 - 0.3.1 (2026-01-11)
     15   * Adds a basic quickcheck test suite for asserting memory safety of
     16     library functions on random inputs.
     17 
     18 - 0.3.0 (2026-01-10)
     19   * The HMAC functions now produce a value of type MAC, which is a
     20     newtype over a ByteString. The 'Eq' instance for MAC compares values
     21     in constant time.
     22 
     23 - 0.2.5 (2026-01-08)
     24   * We now check if the ARM cryptographic extensions are available, and,
     25     if so, use them to calculate hashes. If they're unavailable we
     26     simply use the pure implementation as a fallback. This yields about
     27     a 5x performance boost for 'hash' and 3.5x boost for 'hmac' (again,
     28     when available).
     29 
     30   * Allocation for both the 'hash' and 'hmac' functions has been reduced
     31     dramatically, mostly by optimising the padding internals, and is now
     32     constant with respect to input.
     33 
     34 - 0.2.4 (2025-12-28)
     35   * Adds an 'llvm' build flag and tests with GHC 9.10.3.
     36 
     37 - 0.2.3 (2025-01-21)
     38   * Improves padding handling for the strict bytestring case, yielding
     39     performance increases for both 'hash' and 'hmac'.
     40 
     41 - 0.2.2 (2025-01-07)
     42   * Minor bytestring-handling optimisations.
     43 
     44 - 0.2.1 (2024-10-13)
     45   * Adds an INLINE pragma to an internal step function.
     46 
     47   * 'hmac' no longer calls 'hmac_lazy', which has no practical effect
     48     other than to clean up profiling reports generated by GHC.
     49 
     50 - 0.2.0 (2024-10-07)
     51   * 'hmac' and 'hmac_lazy' now hash long keys before computing a HMAC,
     52     instead of throwing an error, matching RFC 2104's suggested behaviour.
     53 
     54 - 0.1.0 (2024-09-14)
     55   * Initial release, supporting SHA256 and HMAC-SHA256 on strict and lazy
     56     bytestrings.