summaryrefslogtreecommitdiff
path: root/Crypto.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-05 11:12:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-09-05 11:12:01 -0400
commitc4990a41c430d541cefe27a53a39e7eb60e217a8 (patch)
tree21d81f15eb51cef5aa9a5047d0783e4ffbcb04e5 /Crypto.hs
parent217b0d3794ea466c64654b3bd91bbfb55cc40248 (diff)
rename constructor for clariy
Diffstat (limited to 'Crypto.hs')
-rw-r--r--Crypto.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Crypto.hs b/Crypto.hs
index 8b91c2dea..f99f8cbf1 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -78,8 +78,8 @@ genEncryptedCipher keyid variant highQuality = do
encryptCipher (mkCipher random) variant ks
where
(mkCipher, size) = case variant of
- HybridCipher -> (Cipher, cipherSize) -- used for MAC + symmetric
- PubKeyCipher -> (MacOnlyCipher, cipherBeginning) -- only used for MAC
+ Hybrid -> (Cipher, cipherSize) -- used for MAC + symmetric
+ PubKey -> (MacOnlyCipher, cipherBeginning) -- only used for MAC
{- Creates a new, shared Cipher. -}
genSharedCipher :: Bool -> IO StorableCipher
@@ -110,8 +110,8 @@ describeCipher (EncryptedCipher _ variant (KeyIds ks)) =
scheme ++ " with gpg " ++ keys ks ++ " " ++ unwords ks
where
scheme = case variant of
- HybridCipher -> "hybrid cipher"
- PubKeyCipher -> "pubkey crypto"
+ Hybrid -> "hybrid cipher"
+ PubKey -> "pubkey crypto"
keys [_] = "key"
keys _ = "keys"
@@ -135,8 +135,8 @@ decryptCipher (EncryptedCipher t variant _) =
mkCipher <$> Gpg.pipeStrict [ Param "--decrypt" ] t
where
mkCipher = case variant of
- HybridCipher -> Cipher
- PubKeyCipher -> MacOnlyCipher
+ Hybrid -> Cipher
+ PubKey -> MacOnlyCipher
{- 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