summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-22 12:07:17 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-22 12:23:53 -0400
commit1e12f0574214cd68b2d201889ff15e79a5cc0076 (patch)
treee086991e403591205fa73d25129bfac1fc9b1ac8 /Types.hs
parent7ed6961a0e0ef713c136a9d36f86bc7e31414dc5 (diff)
downloadkeysafe-1e12f0574214cd68b2d201889ff15e79a5cc0076.tar.gz
return ProofOfWorkRequirement t
This way the requirement can be varied for different operations.
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Types.hs b/Types.hs
index e66e3b2..a132f26 100644
--- a/Types.hs
+++ b/Types.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances #-}
+{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-}
{- Copyright 2016 Joey Hess <id@joeyh.name>
-
@@ -11,6 +11,7 @@ import Types.Cost
import qualified Data.ByteString as B
import Data.String
import Control.DeepSeq
+import GHC.Generics (Generic)
-- | keysafe stores secret keys.
newtype SecretKey = SecretKey B.ByteString
@@ -29,7 +30,7 @@ instance Bruteforceable EncryptedSecretKey UnknownPassword where
-- | An object in a form suitable to be stored on a keysafe server.
newtype StorableObject = StorableObject { fromStorableObject :: B.ByteString }
- deriving (Show, Eq, Ord)
+ deriving (Show, Eq, Ord, Generic)
-- | An identifier for a StorableObject
newtype StorableObjectIdent = StorableObjectIdent B.ByteString