diff options
Diffstat (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs')
-rw-r--r-- | Codec/Encryption/OpenPGP/ASCIIArmor/Encode.hs | 10 |
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 | |||
37 | endLine atype = BLC8.pack "-----END PGP " `BL.append` aType atype `BL.append` BLC8.pack "-----\n" | 37 | endLine atype = BLC8.pack "-----END PGP " `BL.append` aType atype `BL.append` BLC8.pack "-----\n" |
38 | 38 | ||
39 | aType :: ArmorType -> ByteString | 39 | aType :: ArmorType -> ByteString |
40 | aType (ArmorMessage) = BLC8.pack "MESSAGE" | 40 | aType ArmorMessage = BLC8.pack "MESSAGE" |
41 | aType (ArmorPublicKeyBlock) = BLC8.pack "PUBLIC KEY BLOCK" | 41 | aType ArmorPublicKeyBlock = BLC8.pack "PUBLIC KEY BLOCK" |
42 | aType (ArmorPrivateKeyBlock) = BLC8.pack "PRIVATE KEY BLOCK" | 42 | aType ArmorPrivateKeyBlock = BLC8.pack "PRIVATE KEY BLOCK" |
43 | aType (ArmorSplitMessage x y) = BLC8.pack $ "MESSAGE, PART " ++ show x ++ "/" ++ show y | 43 | aType (ArmorSplitMessage x y) = BLC8.pack $ "MESSAGE, PART " ++ show x ++ "/" ++ show y |
44 | aType (ArmorSplitMessageIndefinite x) = BLC8.pack $ "MESSAGE, PART " ++ show x | 44 | aType (ArmorSplitMessageIndefinite x) = BLC8.pack $ "MESSAGE, PART " ++ show x |
45 | aType (ArmorSignature) = BLC8.pack "SIGNATURE" | 45 | aType ArmorSignature = BLC8.pack "SIGNATURE" |
46 | 46 | ||
47 | armorHeaders :: [(String, String)] -> ByteString | 47 | armorHeaders :: [(String, String)] -> ByteString |
48 | armorHeaders ahs = BLC8.unlines . map armorHeader $ ahs | 48 | armorHeaders = 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 |