pem-0.1.1: Privacy Enhanced Mail (PEM) format reader and writer.

Portabilityportable
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellSafe-Infered

Data.PEM

Description

Read and write PEM files

Synopsis

Documentation

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.

Constructors

PEM 

Fields

pemName :: String

the name of the section, found after the dash BEGIN tag.

pemHeader :: [(String, ByteString)]

optionals key value pair header

pemContent :: ByteString

binary content of the section

Instances

pemWriteBuilder :: PEM -> Builder

write a PEM structure to a builder

pemWriteLBS :: PEM -> ByteString

convert a PEM structure to a lazy bytestring

pemWriteBS :: PEM -> ByteString

convert a PEM structure to a bytestring

pemParser :: Parser [PEM]

parser to get PEM sections

pemParseBS :: ByteString -> Either String [PEM]

parse a PEM content using a strict bytestring

pemParseLBS :: ByteString -> Either String [PEM]

parse a PEM content using a dynamic bytestring