diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-03 22:24:57 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-03 23:29:48 -0400 |
commit | 8ef2095fa00408ce6729596a42bc0abdc7778098 (patch) | |
tree | d6fc3c9f9519ba2ce617a804ce1c5f33f59a9109 /Crypto.hs | |
parent | 003a604a6e48a8a0ffd1564e3399b54e8c673e92 (diff) |
factor out common imports
no code changes
Diffstat (limited to 'Crypto.hs')
-rw-r--r-- | Crypto.hs | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -30,26 +30,17 @@ import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.Map as M import Data.ByteString.Lazy.UTF8 (fromString) import Data.Digest.Pure.SHA -import System.Cmd.Utils -import Data.String.Utils -import Data.List -import Data.Maybe -import System.IO -import System.Posix.IO import System.Posix.Types -import System.Posix.Process import Control.Applicative import Control.Concurrent import Control.Exception (finally) import System.Exit import System.Environment -import Types +import AnnexCommon import Types.Key import Types.Remote -import Utility import Utility.Base64 -import Utility.SafeCommand import Types.Crypto {- The first half of a Cipher is used for HMAC; the remainder @@ -97,9 +88,9 @@ updateCipher :: RemoteConfig -> EncryptedCipher -> IO EncryptedCipher updateCipher c encipher@(EncryptedCipher _ ks) = do ks' <- configKeyIds c cipher <- decryptCipher c encipher - encryptCipher cipher (combine ks ks') + encryptCipher cipher (merge ks ks') where - combine (KeyIds a) (KeyIds b) = KeyIds $ a ++ b + merge (KeyIds a) (KeyIds b) = KeyIds $ a ++ b describeCipher :: EncryptedCipher -> String describeCipher (EncryptedCipher _ (KeyIds ks)) = |