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.
This commit is contained in:
guilhem 2013-09-05 08:09:39 +02:00 committed by Joey Hess
parent 6883c17d62
commit ac9807c887
4 changed files with 53 additions and 46 deletions

View file

@ -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