diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-16 16:41:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-16 16:41:46 -0400 |
commit | 9fe7e6be7064d9c47e6c6fd4f1b3a70da604727d (patch) | |
tree | 503537ba2b11d71f3bea9bd95ee0ca43a73880f7 /CryptoTypes.hs | |
parent | 5efd41327045f8da55c972b7391309c99dee5afc (diff) |
add cipher field to AnnexState
Diffstat (limited to 'CryptoTypes.hs')
-rw-r--r-- | CryptoTypes.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/CryptoTypes.hs b/CryptoTypes.hs new file mode 100644 index 000000000..944a9d34e --- /dev/null +++ b/CryptoTypes.hs @@ -0,0 +1,22 @@ +{- git-annex crypto types + - + - Copyright 2011 Joey Hess <joey@kitenet.net> + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module CryptoTypes where + +import Data.String.Utils + +data Cipher = Cipher String -- XXX ideally, this would be a locked memory region + +data EncryptedCipher = EncryptedCipher String KeyIds + +data KeyIds = KeyIds [String] + +instance Show KeyIds where + show (KeyIds ks) = join "," ks + +instance Read KeyIds where + readsPrec _ s = [(KeyIds (split "," s), "")] |