diff options
-rw-r--r-- | Encryption.hs | 9 |
1 files changed, 5 insertions, 4 deletions
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. |