Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides a function to decrypt a padded and encrypted
stream of ByteString
s.
- decryptPaddedStream :: forall e cipher m. Exception e => BlockCipher cipher => Monad m => e -> Int -> (IV cipher -> ByteString -> (ByteString, IV cipher)) -> IV cipher -> ConduitT ByteString ByteString m ()
- defaultChunkSize :: Int
Decrypt
:: Exception e | |
=> BlockCipher cipher | |
=> Monad m | |
=> e | The exception to throw in case of a padding error |
-> Int | The chunk size (in Bytes, you may use |
-> (IV cipher -> ByteString -> (ByteString, IV cipher)) | The decrypt function |
-> IV cipher | The IV (see |
-> ConduitT ByteString ByteString m () |
Decrypt a PKCS padded and encrypted stream of ByteString
s
runConduitRes $ sourceFile inName .| decryptPaddedStream (error "Padding Error") defaultChunkSize (unCbc key) iv .| sinkFile outName
Since 0.3.0
Re-Export
defaultChunkSize :: Int #
The chunk size used for I/O. Currently set to 32k, less the memory management overhead