summaryrefslogtreecommitdiff
path: root/Data/OpenPGP/Util/Decrypt.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Data/OpenPGP/Util/Decrypt.hs')
-rw-r--r--Data/OpenPGP/Util/Decrypt.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Data/OpenPGP/Util/Decrypt.hs b/Data/OpenPGP/Util/Decrypt.hs
index 84bead5..637d754 100644
--- a/Data/OpenPGP/Util/Decrypt.hs
+++ b/Data/OpenPGP/Util/Decrypt.hs
@@ -14,7 +14,7 @@ import Data.OpenPGP.Util.Base
14 14
15-- decryption codec for withS2K 15-- decryption codec for withS2K
16simpleUnCFB :: (Vincent.BlockCipher k) => k -> Vincent.IV k -> LZ.ByteString -> LZ.ByteString 16simpleUnCFB :: (Vincent.BlockCipher k) => k -> Vincent.IV k -> LZ.ByteString -> LZ.ByteString
17simpleUnCFB k iv = padThenUnpad k (toLazyBS . Vincent.cfbDecrypt k iv . toStrictBS) 17simpleUnCFB k iv = padThenUnpad k (toLazyBS . Vincent.cfbDecrypt k iv . LZ.toStrict)
18 18
19withS2K' :: OpenPGP.SymmetricAlgorithm -> Maybe OpenPGP.S2K -> LZ.ByteString 19withS2K' :: OpenPGP.SymmetricAlgorithm -> Maybe OpenPGP.S2K -> LZ.ByteString
20 -> (forall b. Vincent.BlockCipher b => b -> x) -> x 20 -> (forall b. Vincent.BlockCipher b => b -> x) -> x
@@ -29,7 +29,7 @@ string2key ms2k s = cipher
29 where 29 where
30#if defined(VERSION_cryptonite) 30#if defined(VERSION_cryptonite)
31 CryptoPassed cipher = Vincent.cipherInit k 31 CryptoPassed cipher = Vincent.cipherInit k
32 k = toStrictBS $ LZ.take ksize $ maybe s (\s2k -> OpenPGP.string2key hashBySymbol s2k s) ms2k 32 k = LZ.toStrict $ LZ.take ksize $ maybe s (\s2k -> OpenPGP.string2key hashBySymbol s2k s) ms2k
33#else 33#else
34 cipher = Vincent.cipherInit k 34 cipher = Vincent.cipherInit k
35 Right k = Vincent.makeKey $ toStrictBS $ 35 Right k = Vincent.makeKey $ toStrictBS $