Deprecated

In favour of

siphash

siphash: a fast short input PRF http://github.com/vincenthz/hs-siphash

Version on this page:1.0.3
LTS Haskell 11.15:1.0.3
Stackage Nightly 2018-06-24:1.0.3
Latest on Hackage:1.0.3

See all snapshots siphash appears in

BSD3 licensed and maintained by Vincent Hanquez

Module documentation for 1.0.3

Haskell Siphash

Simple module to compute the SipHash algorithm.

Install

cabal install sighash

Usage

sighash-2-4:

import Crypto.MAC.SigHash (hash)
import qualified Data.ByteString.Char8 as B

k0 = 0xaaaaaaaaaaaaaaaa
k1 = 0xbbbbbbbbbbbbbbbb
tag = hash (SigKey k0 k1) (B.pack "my text to hash")

sighash-c-d:

import Crypto.MAC.SigHash (hash)
import qualified Data.ByteString.Char8 as B

k0 = 0xaaaaaaaaaaaaaaaa
k1 = 0xbbbbbbbbbbbbbbbb
tag = hashWith nbCompressionRounds nbDigestRounds (SigKey k0 k1) (B.pack "my text to hash")
Depends on 3 packages:
comments powered byDisqus