{-# LANGUAGE BangPatterns #-}
module Data.ASN1.Types.Lowlevel
(
ASN1Class(..)
, ASN1Tag
, ASN1Length(..)
, ASN1Header(..)
, ASN1Event(..)
) where
import Data.ByteString (ByteString)
data ASN1Class = Universal
| Application
| Context
| Private
deriving (Show,Eq,Ord,Enum)
type ASN1Tag = Int
data ASN1Length = LenShort Int
| LenLong Int Int
| LenIndefinite
deriving (Show,Eq)
data ASN1Header = ASN1Header !ASN1Class !ASN1Tag !Bool !ASN1Length
deriving (Show,Eq)
data ASN1Event = Header ASN1Header
| Primitive !ByteString
| ConstructionBegin
| ConstructionEnd
deriving (Show,Eq)