Created
December 12, 2011 01:22
-
-
Save thoughtpolice/1464045 to your computer and use it in GitHub Desktop.
Nonce benchmark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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