sha256

Pure Haskell SHA-256, HMAC-SHA256 as specified by RFC's 6234 and 2104.
git clone git://git.ppad.tech/sha256.git
Log | Files | Refs | README | LICENSE

commit 7a762dc2fcb47aebb2d0efb3f6a276f7f9a32f31
parent 42a4a29360c12a524bd31ba8a3f28dd924445a52
Author: Jared Tobin <jared@jtobin.io>
Date:   Wed, 11 Sep 2024 00:35:16 +0400

meta: update flake ghc, lockfile

Diffstat:
Mflake.lock | 6+++---
Mflake.nix | 2+-
Mppad-sha256.cabal | 2+-
Mtest/Main.hs | 6++++++
4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712543224, - "narHash": "sha256-9RSfZL1TKYdGxZwgDxwtBtsKMGR4Zgn+DAnF9s71/lU=", + "lastModified": 1725910328, + "narHash": "sha256-n9pCtzGZ0httmTwMuEbi5E78UQ4ZbQMr1pzi5N0LAG8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b0dab7cc34ef4d8a1b2de36178da801090bcb271", + "rev": "5775c2583f1801df7b790bf7f7d710a19bac66f4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix @@ -14,7 +14,7 @@ pkgs = import nixpkgs { inherit system; }; hlib = pkgs.haskell.lib; - hpkgs = pkgs.haskell.packages.ghc964.override { + hpkgs = pkgs.haskell.packages.ghc966.override { overrides = new: old: { ${lib} = old.callCabal2nix lib ./. {}; }; diff --git a/ppad-sha256.cabal b/ppad-sha256.cabal @@ -8,7 +8,7 @@ author: Jared Tobin maintainer: jared@ppad.tech category: Cryptography build-type: Simple -tested-with: GHC == { 9.6.4 } +tested-with: GHC == { 9.6.6, 9.6.4 } extra-doc-files: CHANGELOG description: A pure implementation of SHA-256 and HMAC-SHA256 on strict and lazy diff --git a/test/Main.hs b/test/Main.hs @@ -1,4 +1,10 @@ module Main where +import qualified Crypto.Hash.SHA256 as SHA256 + +-- https://www.di-mgt.com.au/sha_testvectors.html +-- +-- https://www.di-mgt.com.au/crypto.html#sha256 + main :: IO () main = pure ()