From 2ae2ac2e415a7607be21485652fe94c6e63ead91 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 7 Aug 2016 16:28:19 -0400 Subject: add names --- Encryption.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Encryption.hs') diff --git a/Encryption.hs b/Encryption.hs index a31c004..50fa0fb 100644 --- a/Encryption.hs +++ b/Encryption.hs @@ -17,12 +17,13 @@ import qualified Raaz.Cipher.AES as AES -- | An AES key, which is used to encrypt the key that is stored -- in keysafe. data KeyEncryptionKey = KeyEncryptionKey - AES.KEY256 - (Cost DecryptionOp) - (CostCalc BruteForceOp UnknownPassword) + { keyEncryptionKey :: AES.KEY256 + , keyDecryptionCost :: Cost DecryptionOp + , keyBruteForceCalc :: CostCalc BruteForceOp UnknownPassword + } instance Bruteforceable KeyEncryptionKey UnknownPassword where - getBruteCostCalc (KeyEncryptionKey _ _ c) = c + getBruteCostCalc = keyBruteForceCalc -- | The ExpensiveHash of the Password is combined with a -- RandomObstacle to form the AES key. Combination method is logical OR. -- cgit v1.2.3