siphash algorithm in haskell
Haskell
Latest commit b0e6d91 Aug 3, 2014 @vincenthz Merge pull request #2 from pxqr/patch-1
Fix haddock markup in cabal description field
Permalink
Failed to load latest commit information.
Benchs add Benchmark. Sep 30, 2012
Crypto/MAC just re-indent Sep 18, 2013
Tests add more KATs Sep 30, 2012
.gitignore add gitignore Sep 23, 2013
LICENSE initial commit Jun 24, 2012
README.md Change all instances of sig to sip Dec 16, 2012
Setup.hs initial commit Jun 24, 2012
siphash.cabal Fix haddock markup in cabal description field Aug 2, 2014

README.md

Haskell Siphash

Simple module to compute the SipHash algorithm.

Install

cabal install siphash

Usage

siphash-2-4:

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

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

siphash-c-d:

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

k0 = 0xaaaaaaaaaaaaaaaa
k1 = 0xbbbbbbbbbbbbbbbb
tag = hashWith nbCompressionRounds nbDigestRounds (SipKey k0 k1) (B.pack "my text to hash")