asn1-types-0.3.4: 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 Source #

Element class

Constructors

Universal |
Application |
Context |
Private |

#### Instances

Instances details

Enum ASN1Class Source # |

Instance details

Defined in Data.ASN1.Types.Lowlevel

Methods

succ :: ASN1Class -> ASN1Class Source #

pred :: ASN1Class -> ASN1Class Source #

toEnum :: Int -> ASN1Class Source #

fromEnum :: ASN1Class -> Int Source #

enumFrom :: ASN1Class -> [ASN1Class] Source #

enumFromThen :: ASN1Class -> ASN1Class -> [ASN1Class] Source #

enumFromTo :: ASN1Class -> ASN1Class -> [ASN1Class] Source #

enumFromThenTo :: ASN1Class -> ASN1Class -> ASN1Class -> [ASN1Class] Source #

Show ASN1Class Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods showsPrec :: Int -> ASN1Class -> ShowS Source # show :: ASN1Class -> String Source # showList :: [ASN1Class] -> ShowS Source #
Eq ASN1Class Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods (==) :: ASN1Class -> ASN1Class -> Bool Source # (/=) :: ASN1Class -> ASN1Class -> Bool Source #
Ord ASN1Class Source # |

Instance details

Defined in Data.ASN1.Types.Lowlevel

Methods

compare :: ASN1Class -> ASN1Class -> Ordering Source #

(<) :: ASN1Class -> ASN1Class -> Bool Source #

(<=) :: ASN1Class -> ASN1Class -> Bool Source #

(>) :: ASN1Class -> ASN1Class -> Bool Source #

(>=) :: ASN1Class -> ASN1Class -> Bool Source #

max :: ASN1Class -> ASN1Class -> ASN1Class Source #

min :: ASN1Class -> ASN1Class -> ASN1Class Source #

type ASN1Tag = Int Source #

ASN1 Tag

data ASN1Length Source #

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

Instances details

Show ASN1Length Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods showsPrec :: Int -> ASN1Length -> ShowS Source # show :: ASN1Length -> String Source # showList :: [ASN1Length] -> ShowS Source #
Eq ASN1Length Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods (==) :: ASN1Length -> ASN1Length -> Bool Source # (/=) :: ASN1Length -> ASN1Length -> Bool Source #

data ASN1Header Source #

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

Constructors

ASN1Header !ASN1Class !ASN1Tag !Bool !ASN1Length |

#### Instances

Instances details

Show ASN1Header Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods showsPrec :: Int -> ASN1Header -> ShowS Source # show :: ASN1Header -> String Source # showList :: [ASN1Header] -> ShowS Source #
Eq ASN1Header Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods (==) :: ASN1Header -> ASN1Header -> Bool Source # (/=) :: ASN1Header -> ASN1Header -> Bool Source #

# Events types

data ASN1Event Source #

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

Instances details

Show ASN1Event Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods showsPrec :: Int -> ASN1Event -> ShowS Source # show :: ASN1Event -> String Source # showList :: [ASN1Event] -> ShowS Source #
Eq ASN1Event Source # |
Instance details Defined in Data.ASN1.Types.Lowlevel Methods (==) :: ASN1Event -> ASN1Event -> Bool Source # (/=) :: ASN1Event -> ASN1Event -> Bool Source #