License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Data.ASN1.BinaryEncoding.Raw
Description
Raw encoding of binary format (BERDERCER)
Synopsis
- data ASN1Header = ASN1Header !ASN1Class !ASN1Tag !Bool !ASN1Length
- data ASN1Class
- type ASN1Tag = Int
- data ASN1Length
- = LenShort Int
- | LenLong Int Int
- | LenIndefinite
- data ASN1Event
- = Header ASN1Header
- | Primitive !ByteString
- | ConstructionBegin
- | ConstructionEnd
- parseLBS :: ByteString -> Either ASN1Error [ASN1Event]
- parseBS :: ByteString -> Either ASN1Error [ASN1Event]
- toLazyByteString :: [ASN1Event] -> ByteString
- toByteString :: [ASN1Event] -> ByteString
types
data ASN1Header #
Constructors
ASN1Header !ASN1Class !ASN1Tag !Bool !ASN1Length |
Instances
Show ASN1Header | |
Defined in Data.ASN1.Types.Lowlevel Methods showsPrec :: Int -> ASN1Header -> ShowS show :: ASN1Header -> String showList :: [ASN1Header] -> ShowS | |
Eq ASN1Header | |
Defined in Data.ASN1.Types.Lowlevel |
Constructors
Universal | |
Application | |
Context | |
Private |
Instances
Enum ASN1Class | |
Defined in Data.ASN1.Types.Lowlevel | |
Show ASN1Class | |
Eq ASN1Class | |
Ord ASN1Class | |
Defined in Data.ASN1.Types.Lowlevel |
data ASN1Length #
Constructors
LenShort Int | |
LenLong Int Int | |
LenIndefinite |
Instances
Show ASN1Length | |
Defined in Data.ASN1.Types.Lowlevel Methods showsPrec :: Int -> ASN1Length -> ShowS show :: ASN1Length -> String showList :: [ASN1Length] -> ShowS | |
Eq ASN1Length | |
Defined in Data.ASN1.Types.Lowlevel |
Constructors
Header ASN1Header | |
Primitive !ByteString | |
ConstructionBegin | |
ConstructionEnd |
parser
parseLBS :: ByteString -> Either ASN1Error [ASN1Event] Source #
Parse one lazy bytestring and returns on success all ASN1 events associated.
parseBS :: ByteString -> Either ASN1Error [ASN1Event] Source #
Parse one strict bytestring and returns on success all ASN1 events associated.
writer
toLazyByteString :: [ASN1Event] -> ByteString Source #
transform a list of ASN1 Events into a lazy bytestring
toByteString :: [ASN1Event] -> ByteString Source #
transform a list of ASN1 Events into a strict bytestring