summaryrefslogtreecommitdiff
path: root/Data/OpenPGP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Data/OpenPGP.hs')
-rw-r--r--Data/OpenPGP.hs7
1 files changed, 0 insertions, 7 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs
index 4133f38..f05f83e 100644
--- a/Data/OpenPGP.hs
+++ b/Data/OpenPGP.hs
@@ -129,9 +129,6 @@ compress algo = toStrictBS . lazyCompress algo . toLazyBS
129decompress :: CompressionAlgorithm -> B.ByteString -> B.ByteString 129decompress :: CompressionAlgorithm -> B.ByteString -> B.ByteString
130decompress algo = toStrictBS . lazyDecompress algo . toLazyBS 130decompress algo = toStrictBS . lazyDecompress algo . toLazyBS
131 131
132toStrictBS :: LZ.ByteString -> B.ByteString
133toStrictBS = B.concat . LZ.toChunks
134
135toLazyBS :: B.ByteString -> LZ.ByteString 132toLazyBS :: B.ByteString -> LZ.ByteString
136toLazyBS = LZ.fromChunks . (:[]) 133toLazyBS = LZ.fromChunks . (:[])
137 134
@@ -194,10 +191,6 @@ pad l s = replicate (l - length s) '0' ++ s
194padBS :: Int -> B.ByteString -> B.ByteString 191padBS :: Int -> B.ByteString -> B.ByteString
195padBS l s = B.replicate (fromIntegral l - B.length s) 0 `B.append` s 192padBS l s = B.replicate (fromIntegral l - B.length s) 0 `B.append` s
196 193
197checksum :: B.ByteString -> Word16
198checksum = fromIntegral .
199 B.foldl (\c i -> (c + fromIntegral i) `mod` 65536) (0::Integer)
200
201data Packet = 194data Packet =
202 AsymmetricSessionKeyPacket { 195 AsymmetricSessionKeyPacket {
203 version :: Word8, 196 version :: Word8,