-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Privacy Enhanced Mail (PEM) format reader and writer.
--   
--   Privacy Enhanced Mail (PEM) format reader and writer. long description
@package pem
@version 0.2.4


-- | Read and write PEM files
module Data.PEM

-- | Represent one PEM section
--   
--   for now headers are not serialized at all. this is just available here
--   as a placeholder for a later implementation.
data PEM
PEM :: String -> [(String, ByteString)] -> ByteString -> PEM

-- | the name of the section, found after the dash BEGIN tag.
[pemName] :: PEM -> String

-- | optionals key value pair header
[pemHeader] :: PEM -> [(String, ByteString)]

-- | binary content of the section
[pemContent] :: PEM -> ByteString

-- | convert a PEM structure to a lazy bytestring
pemWriteLBS :: PEM -> ByteString

-- | convert a PEM structure to a bytestring
pemWriteBS :: PEM -> ByteString

-- | parse a PEM content using a strict bytestring
pemParseBS :: ByteString -> Either String [PEM]

-- | parse a PEM content using a dynamic bytestring
pemParseLBS :: ByteString -> Either String [PEM]
