diff options
Diffstat (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs')
-rw-r--r-- | Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs | 17 |
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 | |||
6 | module Codec.Encryption.OpenPGP.ASCIIArmor.Utils ( | ||
7 | crlfUnlines | ||
8 | ) where | ||
9 | |||
10 | import Data.ByteString (ByteString) | ||
11 | import qualified Data.ByteString as B | ||
12 | import qualified Data.ByteString.Char8 as BC8 | ||
13 | import Data.List (intersperse) | ||
14 | |||
15 | crlfUnlines :: [ByteString] -> ByteString | ||
16 | crlfUnlines [] = B.empty | ||
17 | crlfUnlines ss = B.concat $ intersperse (BC8.pack "\r\n") ss | ||