-- ASCIIArmor/Decode.hs: OpenPGP (RFC4880) ASCII armor implementation
-- Copyright © 2012  Clint Adams
-- This software is released under the terms of the Expat license.
-- (See the LICENSE file).

module Codec.Encryption.OpenPGP.ASCIIArmor.Types (
   Armor(..)
 , ArmorType(..)
) where

import Data.ByteString.Lazy (ByteString)

data Armor = Armor ArmorType [(String, String)] ByteString
   | ClearSigned [(String, String)] ByteString Armor
    deriving (Int -> Armor -> ShowS
[Armor] -> ShowS
Armor -> String
(Int -> Armor -> ShowS)
-> (Armor -> String) -> ([Armor] -> ShowS) -> Show Armor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Armor -> ShowS
showsPrec :: Int -> Armor -> ShowS
$cshow :: Armor -> String
show :: Armor -> String
$cshowList :: [Armor] -> ShowS
showList :: [Armor] -> ShowS
Show, Armor -> Armor -> Bool
(Armor -> Armor -> Bool) -> (Armor -> Armor -> Bool) -> Eq Armor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Armor -> Armor -> Bool
== :: Armor -> Armor -> Bool
$c/= :: Armor -> Armor -> Bool
/= :: Armor -> Armor -> Bool
Eq)

data ArmorType = ArmorMessage
               | ArmorPublicKeyBlock
               | ArmorPrivateKeyBlock
               | ArmorSplitMessage ByteString ByteString
               | ArmorSplitMessageIndefinite ByteString
               | ArmorSignature
    deriving (Int -> ArmorType -> ShowS
[ArmorType] -> ShowS
ArmorType -> String
(Int -> ArmorType -> ShowS)
-> (ArmorType -> String)
-> ([ArmorType] -> ShowS)
-> Show ArmorType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ArmorType -> ShowS
showsPrec :: Int -> ArmorType -> ShowS
$cshow :: ArmorType -> String
show :: ArmorType -> String
$cshowList :: [ArmorType] -> ShowS
showList :: [ArmorType] -> ShowS
Show, ArmorType -> ArmorType -> Bool
(ArmorType -> ArmorType -> Bool)
-> (ArmorType -> ArmorType -> Bool) -> Eq ArmorType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ArmorType -> ArmorType -> Bool
== :: ArmorType -> ArmorType -> Bool
$c/= :: ArmorType -> ArmorType -> Bool
/= :: ArmorType -> ArmorType -> Bool
Eq)