asn1-encoding-0.9.5: ASN1 data reader and writer in RAW, BER and DER forms

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.ASN1.Encoding

Contents

Description

 

Synopsis

generic class for decoding and encoding stream

class ASN1Decoding a where #

Describe an ASN1 decoding, that transform a bytestream into an asn1stream

Minimal complete definition

decodeASN1

Methods

decodeASN1 :: a -> ByteString -> Either ASN1Error [ASN1] #

decode a lazy bytestring into an ASN1 stream

class ASN1DecodingRepr a where #

transition class.

Minimal complete definition

decodeASN1Repr

Methods

decodeASN1Repr :: a -> ByteString -> Either ASN1Error [ASN1Repr] #

decode a lazy bytestring into an ASN1 stream

class ASN1Encoding a where #

Describe an ASN1 encoding, that transform an asn1stream into a bytestream

Minimal complete definition

encodeASN1

Methods

encodeASN1 :: a -> [ASN1] -> ByteString #

encode a stream into a lazy bytestring

Instances

strict bytestring version

decodeASN1' :: ASN1Decoding a => a -> ByteString -> Either ASN1Error [ASN1] #

decode a strict bytestring into an ASN1 stream

decodeASN1Repr' :: ASN1DecodingRepr a => a -> ByteString -> Either ASN1Error [ASN1Repr] #

decode a strict bytestring into an ASN1Repr stream

encodeASN1' :: ASN1Encoding a => a -> [ASN1] -> ByteString #

encode a stream into a strict bytestring