asn1-types-0.3.0: ASN.1 types

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | unknown
Safe Haskell | Safe-Inferred
Language | Haskell98

Data.ASN1.Types.Lowlevel

Contents

- Raw types
- Events types

Description

Synopsis

- data ASN1Class
  - = Universal
  - | Application
  - | Context
  - | Private
- type ASN1Tag = Int
- data ASN1Length
  - = LenShort Int
  - | LenLong Int Int
  - | LenIndefinite
- data ASN1Header = ASN1Header !ASN1Class !ASN1Tag !Bool !ASN1Length
- data ASN1Event
  - = Header ASN1Header
  - | Primitive !ByteString
  - | ConstructionBegin
  - | ConstructionEnd

# Raw types

data ASN1Class

Element class

Constructors

Universal |
Application |
Context |
Private |

Instances

Enum ASN1Class |
Eq ASN1Class |
Ord ASN1Class |
Show ASN1Class |

type ASN1Tag = Int

ASN1 Tag

data ASN1Length

ASN1 Length with all different formats

Constructors

LenShort Int | Short form with only one byte. length has to be < 127.
LenLong Int Int | Long form of N bytes
LenIndefinite | Length is indefinite expect an EOC in the stream to finish the type

Instances

Eq ASN1Length |
Show ASN1Length |

data ASN1Header

ASN1 Header with the class, tag, constructed flag and length.

Constructors

ASN1Header !ASN1Class !ASN1Tag !Bool !ASN1Length |

Instances

Eq ASN1Header |
Show ASN1Header |

# Events types

data ASN1Event

represent one event from an asn1 data stream

Constructors

Header ASN1Header | ASN1 Header
Primitive !ByteString | Primitive
ConstructionBegin | Constructed value start
ConstructionEnd | Constructed value end

Instances

Eq ASN1Event |
Show ASN1Event |