From 5ed645493e10190f7cddd753bb058e8487037549 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Wed, 25 Apr 2012 16:38:48 -0400 Subject: Separate ASCII armor codec into its own package, change license to ISC, and change API toward Stephen Paul Weber's proposal. --- Codec/Encryption/OpenPGP/ASCIIArmor/Types.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Codec/Encryption/OpenPGP/ASCIIArmor/Types.hs (limited to 'Codec/Encryption/OpenPGP/ASCIIArmor/Types.hs') diff --git a/Codec/Encryption/OpenPGP/ASCIIArmor/Types.hs b/Codec/Encryption/OpenPGP/ASCIIArmor/Types.hs new file mode 100644 index 0000000..8c7ef6f --- /dev/null +++ b/Codec/Encryption/OpenPGP/ASCIIArmor/Types.hs @@ -0,0 +1,23 @@ +-- ASCIIArmor/Decode.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.Types ( + Armor(..) + , ArmorType(..) +) where + +import Data.ByteString (ByteString) + +data Armor a = Armor (ArmorType a) [(String, String)] ByteString + | ClearSigned [(String, String)] String (Armor a) + deriving (Show, Eq) + +data ArmorType a = ArmorMessage + | ArmorPublicKeyBlock + | ArmorPrivateKeyBlock + | ArmorSplitMessage a a + | ArmorSplitMessageIndefinite a + | ArmorSignature + deriving (Show, Eq) -- cgit v1.2.3