bip39

BIP39 mnemonic codes in Haskell (docs.ppad.tech/bip39).
git clone git://git.ppad.tech/bip39.git
Log | Files | Refs | README | LICENSE

commit 73c7539aa3bf1cba88f059428122450e7104b639
parent fce277cba3e31c098dc1e6bce6842038c14aece2
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri, 28 Feb 2025 07:17:15 +0400

bench: basic suite

Diffstat:
Mbench/Main.hs | 22+++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/bench/Main.hs b/bench/Main.hs @@ -1,4 +1,24 @@ +{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE OverloadedStrings #-} + module Main where +import Criterion.Main +import Crypto.KDF.BIP39 + main :: IO () -main = pure () +main = defaultMain [ + bgroup "ppad-bip39" [ + bench_mnemonic + , bench_seed + ] + ] + +bench_mnemonic :: Benchmark +bench_mnemonic = bench "mnemonic" $ nf mnemonic "my ultra secret entropy!" + +bench_seed :: Benchmark +bench_seed = bench "seed" $ nf (seed mnem) mempty where + mnem = "hope simple bubble suggest elbow correct limb hole gloom nasty fringe dolphin finger demand situate unlock junior autumn" +