finish making rsync support chunking

This breaks gcrypt, which relies on some internals of the rsync remote.
To fix next..
This commit is contained in:
Joey Hess 2014-08-03 16:54:57 -04:00
parent 6c450aad1d
commit f5f961215b
3 changed files with 37 additions and 38 deletions

View file

@ -22,6 +22,7 @@ module Crypto (
describeCipher,
decryptCipher,
encryptKey,
isEncKey,
feedFile,
feedBytes,
readBytes,
@ -150,9 +151,15 @@ type EncKey = Key -> Key
encryptKey :: Mac -> Cipher -> EncKey
encryptKey mac c k = stubKey
{ keyName = macWithCipher mac c (key2file k)
, keyBackendName = "GPG" ++ showMac mac
, keyBackendName = encryptedBackendNamePrefix ++ showMac mac
}
encryptedBackendNamePrefix :: String
encryptedBackendNamePrefix = "GPG"
isEncKey :: Key -> Bool
isEncKey k = encryptedBackendNamePrefix `isPrefixOf` keyBackendName k
type Feeder = Handle -> IO ()
type Reader m a = Handle -> m a