summaryrefslogtreecommitdiff
path: root/Utility/Verifiable.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Verifiable.hs')
-rw-r--r--Utility/Verifiable.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utility/Verifiable.hs b/Utility/Verifiable.hs
index b177787c4..d586d7453 100644
--- a/Utility/Verifiable.hs
+++ b/Utility/Verifiable.hs
@@ -24,14 +24,14 @@ data Verifiable a = Verifiable
mkVerifiable :: Show a => a -> Secret -> Verifiable a
mkVerifiable a secret = Verifiable a (calcDigest (show a) secret)
-verified :: (Eq a, Show a) => Verifiable a -> Secret -> Bool
-verified v secret = v == mkVerifiable (verifiableVal v) secret
+verify :: (Eq a, Show a) => Verifiable a -> Secret -> Bool
+verify v secret = v == mkVerifiable (verifiableVal v) secret
calcDigest :: String -> Secret -> HMACDigest
calcDigest v secret = showDigest $ hmacSha1 secret $ fromString v
{- for quickcheck -}
prop_verifiable_sane :: String -> String -> Bool
-prop_verifiable_sane a s = verified (mkVerifiable a secret) secret
+prop_verifiable_sane a s = verify (mkVerifiable a secret) secret
where
secret = fromString s