Skip to content

Instantly share code, notes, and snippets.

@thoughtpolice
Created December 12, 2011 01:22
Show Gist options
  • Save thoughtpolice/1464045 to your computer and use it in GitHub Desktop.
Save thoughtpolice/1464045 to your computer and use it in GitHub Desktop.
Nonce benchmark
{-# LANGUAGE BangPatterns #-}
import Crypto.NaCl.Encrypt.PublicKey
import Crypto.NaCl.Nonce
import Data.List
import System.Environment
main = do
[f] <- getArgs
let n = createZeroNonce nonceLength
print n
print $ go n (read f :: Int)
where
go !n 0 = n
go !n !x = go (incNonce n) (x-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment