summaryrefslogtreecommitdiff
path: root/Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs
blob: 014c8aaf1c30688d4f3278d0e98923ccb3fb45f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- ASCIIArmor/Utils.hs: OpenPGP (RFC4880) ASCII armor implementation
-- Copyright Ⓒ 2012  Clint Adams
-- This software is released under the terms of the ISC license.
-- (See the LICENSE file).

module Codec.Encryption.OpenPGP.ASCIIArmor.Utils (
   crlfUnlines
) where

import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC8
import Data.List (intersperse)

crlfUnlines :: [ByteString] -> ByteString
crlfUnlines [] = B.empty
crlfUnlines ss = B.concat $ intersperse (BC8.pack "\r\n") ss