From 716dd382221343e5da5daf1a9a8ac40304a7d74b Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Thu, 26 Apr 2012 16:29:50 -0400 Subject: Codec for "Cleartext Signatures" --- Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Utils.hs') 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 @@ +-- 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 -- cgit v1.2.3