mirror of https://github.com/voidlizard/hbs2
23 lines
444 B
Haskell
23 lines
444 B
Haskell
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
module OneTimeAuthProperties (
|
|
testOneTimeAuth
|
|
) where
|
|
|
|
import Util
|
|
|
|
import Crypto.Saltine.Core.OneTimeAuth
|
|
|
|
import Test.Framework.Providers.QuickCheck2
|
|
import Test.Framework
|
|
|
|
testOneTimeAuth :: Test
|
|
testOneTimeAuth = buildTest $ do
|
|
k <- newKey
|
|
return $ testGroup "...Internal.Auth (one-time)" [
|
|
|
|
testProperty "Authenticates message"
|
|
$ \(Message bs) -> verify k (auth k bs) bs == True
|
|
|
|
]
|