asn1-encoding-0.9.6: 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.Prim

Description

Tools to read ASN1 primitive (e.g. boolean, int)

Synopsis

ASN1 high level algebraic type

data ASN1 #

Define high level ASN1 object.

Instances

Instances details
Eq ASN1 
Instance details

Defined in Data.ASN1.Types

Methods

(==) :: ASN1 -> ASN1 -> Bool #

(/=) :: ASN1 -> ASN1 -> Bool #

Show ASN1 
Instance details

Defined in Data.ASN1.Types

Methods

showsPrec :: Int -> ASN1 -> ShowS #

show :: ASN1 -> String #

showList :: [ASN1] -> ShowS #

data ASN1ConstructionType #

Define the type of container

Instances

Instances details
Eq ASN1ConstructionType 
Instance details

Defined in Data.ASN1.Types

Show ASN1ConstructionType 
Instance details

Defined in Data.ASN1.Types

decodePrimitive :: ASN1Header -> ByteString -> ASN1Ret #

marshall an ASN1 type from a val struct or a bytestring

getBoolean :: Bool -> ByteString -> Either ASN1Error ASN1 #

getInteger :: ByteString -> Either ASN1Error ASN1 #

getInteger, parse a value bytestring and get the integer out of the two complement encoded bytes

getDouble :: ByteString -> Either ASN1Error ASN1 #

getNull :: ByteString -> Either ASN1Error ASN1 #

getOID :: ByteString -> Either ASN1Error ASN1 #

return an OID

marshall an ASN1 type to a bytestring

putInteger :: Integer -> ByteString #

putDouble :: Double -> ByteString #

putBitString :: BitArray -> ByteString #

putString :: ByteString -> ByteString #

putOID :: [Integer] -> ByteString #