Deprecated

In favour of

siphash

siphash: a fast short input PRF

http://github.com/vincenthz/hs-siphash

Version on this page:1.0.3@rev:1
LTS Haskell 19.33:1.0.3@rev:2
Stackage Nightly 2022-03-17:1.0.3@rev:2
Latest on Hackage:1.0.3@rev:2

See all snapshots siphash appears in

BSD-3-Clause licensed and maintained by Vincent Hanquez
This version can be pinned in stack with:siphash-1.0.3@sha256:d629325f124617deeb6f1b172c8cbb30556090b32f3533cf8ea93ecb3df04de0,1218

Module documentation for 1.0.3

Depends on 3 packages(full list with versions):
Used by 1 package in nightly-2021-08-15(full list with versions):

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")