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


-- | A library to read and write files in the Privacy Enhanced Mail (PEM)
--   format.
@package crypton-pem
@version 0.3.0


-- | Read and write Privacy Enhanced Mail (PEM) files.
module Data.PEM

-- | A type representing single PEM sections.
data PEM
PEM :: String -> [(String, ByteString)] -> ByteString -> PEM

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

-- | Optional key-value pairs header. The library does not currently
--   serialize headers.
[pemHeader] :: PEM -> [(String, ByteString)]

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

-- | Convert the specified <a>PEM</a> to a strict <a>ByteString</a>.
pemWriteBS :: PEM -> ByteString

-- | Convert the specified <a>PEM</a> to a lazy <a>ByteString</a>.
pemWriteLBS :: PEM -> ByteString

-- | Parse PEM content from a strict <a>ByteString</a>.
pemParseBS :: ByteString -> Either String [PEM]

-- | Parse PEM content from a lazy <a>ByteString</a>.
pemParseLBS :: ByteString -> Either String [PEM]
