From 217b0d3794ea466c64654b3bd91bbfb55cc40248 Mon Sep 17 00:00:00 2001 From: guilhem Date: Thu, 5 Sep 2013 08:09:39 +0200 Subject: Leverage an ambiguities between Ciphers Cipher is now a datatype data Cipher = Cipher String | MacOnlyCipher String which makes more precise its interpretation MAC-only vs. MAC + used to derive a key for symmetric crypto. --- Types/Crypto.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Types') diff --git a/Types/Crypto.hs b/Types/Crypto.hs index 8a15ead16..487a29391 100644 --- a/Types/Crypto.hs +++ b/Types/Crypto.hs @@ -23,7 +23,7 @@ import Data.Digest.Pure.SHA import Utility.Gpg (KeyIds(..)) -- XXX ideally, this would be a locked memory region -newtype Cipher = Cipher String +data Cipher = Cipher String | MacOnlyCipher String data StorableCipher = EncryptedCipher String EncryptedCipherVariant KeyIds | SharedCipher String -- cgit v1.2.3