summaryrefslogtreecommitdiff
path: root/Crypto.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Crypto.hs')
-rw-r--r--Crypto.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Crypto.hs b/Crypto.hs
index 0bfa81db2..89b47f318 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -13,6 +13,7 @@
module Crypto (
Cipher,
KeyIds(..),
+ EncKey,
StorableCipher(..),
genEncryptedCipher,
genSharedCipher,
@@ -138,10 +139,12 @@ decryptCipher (EncryptedCipher t variant _) =
Hybrid -> Cipher
PubKey -> MacOnlyCipher
+type EncKey = Key -> Key
+
{- Generates an encrypted form of a Key. The encryption does not need to be
- reversable, nor does it need to be the same type of encryption used
- on content. It does need to be repeatable. -}
-encryptKey :: Mac -> Cipher -> Key -> Key
+encryptKey :: Mac -> Cipher -> EncKey
encryptKey mac c k = stubKey
{ keyName = macWithCipher mac c (key2file k)
, keyBackendName = "GPG" ++ showMac mac