Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

siphash algorithm in haskell

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Benchs
Octocat-spinner-32 Crypto
Octocat-spinner-32 Tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 siphash.cabal
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")
Something went wrong with that request. Please try again.