summaryrefslogtreecommitdiff
path: root/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs')
-rw-r--r--Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs b/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs
new file mode 100644
index 0000000..014c8aa
--- /dev/null
+++ b/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs
@@ -0,0 +1,17 @@
1-- ASCIIArmor/Utils.hs: OpenPGP (RFC4880) ASCII armor implementation
2-- Copyright Ⓒ 2012 Clint Adams
3-- This software is released under the terms of the ISC license.
4-- (See the LICENSE file).
5
6module Codec.Encryption.OpenPGP.ASCIIArmor.Utils (
7 crlfUnlines
8) where
9
10import Data.ByteString (ByteString)
11import qualified Data.ByteString as B
12import qualified Data.ByteString.Char8 as BC8
13import Data.List (intersperse)
14
15crlfUnlines :: [ByteString] -> ByteString
16crlfUnlines [] = B.empty
17crlfUnlines ss = B.concat $ intersperse (BC8.pack "\r\n") ss