summaryrefslogtreecommitdiff
path: root/Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs')
-rw-r--r--Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs b/Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs
index fdb9961..cb5b16d 100644
--- a/Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs
+++ b/Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs
@@ -37,15 +37,15 @@ endLine :: ArmorType -> ByteString
37endLine atype = BLC8.pack "-----END PGP " `BL.append` aType atype `BL.append` BLC8.pack "-----\n" 37endLine atype = BLC8.pack "-----END PGP " `BL.append` aType atype `BL.append` BLC8.pack "-----\n"
38 38
39aType :: ArmorType -> ByteString 39aType :: ArmorType -> ByteString
40aType (ArmorMessage) = BLC8.pack "MESSAGE" 40aType ArmorMessage = BLC8.pack "MESSAGE"
41aType (ArmorPublicKeyBlock) = BLC8.pack "PUBLIC KEY BLOCK" 41aType ArmorPublicKeyBlock = BLC8.pack "PUBLIC KEY BLOCK"
42aType (ArmorPrivateKeyBlock) = BLC8.pack "PRIVATE KEY BLOCK" 42aType ArmorPrivateKeyBlock = BLC8.pack "PRIVATE KEY BLOCK"
43aType (ArmorSplitMessage x y) = BLC8.pack $ "MESSAGE, PART " ++ show x ++ "/" ++ show y 43aType (ArmorSplitMessage x y) = BLC8.pack $ "MESSAGE, PART " ++ show x ++ "/" ++ show y
44aType (ArmorSplitMessageIndefinite x) = BLC8.pack $ "MESSAGE, PART " ++ show x 44aType (ArmorSplitMessageIndefinite x) = BLC8.pack $ "MESSAGE, PART " ++ show x
45aType (ArmorSignature) = BLC8.pack "SIGNATURE" 45aType ArmorSignature = BLC8.pack "SIGNATURE"
46 46
47armorHeaders :: [(String, String)] -> ByteString 47armorHeaders :: [(String, String)] -> ByteString
48armorHeaders ahs = BLC8.unlines . map armorHeader $ ahs 48armorHeaders = BLC8.unlines . map armorHeader
49 where 49 where
50 armorHeader :: (String, String) -> ByteString 50 armorHeader :: (String, String) -> ByteString
51 armorHeader (k, v) = BLC8.pack k `BL.append` BLC8.pack ": " `BL.append` BLC8.pack v 51 armorHeader (k, v) = BLC8.pack k `BL.append` BLC8.pack ": " `BL.append` BLC8.pack v