From ff5c89ee76c707228afc66afac573c6fd0efffa3 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Sat, 16 May 2020 08:32:17 -0400 Subject: Refactor toward draft-ietf-openpgp-rfc4880bis-09. --- Data/OpenPGP.hs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'Data/OpenPGP.hs') 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 decompress :: CompressionAlgorithm -> B.ByteString -> B.ByteString decompress algo = toStrictBS . lazyDecompress algo . toLazyBS -toStrictBS :: LZ.ByteString -> B.ByteString -toStrictBS = B.concat . LZ.toChunks - toLazyBS :: B.ByteString -> LZ.ByteString toLazyBS = LZ.fromChunks . (:[]) @@ -194,10 +191,6 @@ pad l s = replicate (l - length s) '0' ++ s padBS :: Int -> B.ByteString -> B.ByteString padBS l s = B.replicate (fromIntegral l - B.length s) 0 `B.append` s -checksum :: B.ByteString -> Word16 -checksum = fromIntegral . - B.foldl (\c i -> (c + fromIntegral i) `mod` 65536) (0::Integer) - data Packet = AsymmetricSessionKeyPacket { version :: Word8, -- cgit v1.2.3