License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Tools to read ASN1 primitive (e.g. boolean, int)
Synopsis
- data ASN1
- data ASN1ConstructionType
- encodeHeader :: Bool -> ASN1Length -> ASN1 -> ASN1Header
- encodePrimitiveHeader :: ASN1Length -> ASN1 -> ASN1Header
- encodePrimitive :: ASN1 -> (Int, [ASN1Event])
- decodePrimitive :: ASN1Header -> ByteString -> ASN1Ret
- encodeConstructed :: ASN1 -> [ASN1] -> (Int, [ASN1Event])
- encodeList :: [ASN1] -> (Int, [ASN1Event])
- encodeOne :: ASN1 -> (Int, [ASN1Event])
- mkSmallestLength :: Int -> ASN1Length
- getBoolean :: Bool -> ByteString -> Either ASN1Error ASN1
- getInteger :: ByteString -> Either ASN1Error ASN1
- getDouble :: ByteString -> Either ASN1Error ASN1
- getBitString :: ByteString -> Either ASN1Error ASN1
- getOctetString :: ByteString -> Either ASN1Error ASN1
- getNull :: ByteString -> Either ASN1Error ASN1
- getOID :: ByteString -> Either ASN1Error ASN1
- getTime :: ASN1TimeType -> ByteString -> Either ASN1Error ASN1
- putTime :: ASN1TimeType -> DateTime -> Maybe TimezoneOffset -> ByteString
- putInteger :: Integer -> ByteString
- putDouble :: Double -> ByteString
- putBitString :: BitArray -> ByteString
- putString :: ByteString -> ByteString
- putOID :: [Integer] -> ByteString
ASN1 high level algebraic type
Define high level ASN1 object.
data ASN1ConstructionType #
Define the type of container
Instances
Eq ASN1ConstructionType | |
Defined in Data.ASN1.Types (==) :: ASN1ConstructionType -> ASN1ConstructionType -> Bool # (/=) :: ASN1ConstructionType -> ASN1ConstructionType -> Bool # | |
Show ASN1ConstructionType | |
Defined in Data.ASN1.Types showsPrec :: Int -> ASN1ConstructionType -> ShowS # show :: ASN1ConstructionType -> String # showList :: [ASN1ConstructionType] -> ShowS # |
encodeHeader :: Bool -> ASN1Length -> ASN1 -> ASN1Header Source #
encodePrimitiveHeader :: ASN1Length -> ASN1 -> ASN1Header Source #
decodePrimitive :: ASN1Header -> ByteString -> ASN1Ret Source #
mkSmallestLength :: Int -> ASN1Length Source #
marshall an ASN1 type from a val struct or a bytestring
getBoolean :: Bool -> ByteString -> Either ASN1Error ASN1 Source #
getInteger :: ByteString -> Either ASN1Error ASN1 Source #
getInteger, parse a value bytestring and get the integer out of the two complement encoded bytes
getBitString :: ByteString -> Either ASN1Error ASN1 Source #
getTime :: ASN1TimeType -> ByteString -> Either ASN1Error ASN1 Source #
marshall an ASN1 type to a bytestring
putTime :: ASN1TimeType -> DateTime -> Maybe TimezoneOffset -> ByteString Source #
putInteger :: Integer -> ByteString Source #
putDouble :: Double -> ByteString Source #
putBitString :: BitArray -> ByteString Source #
putString :: ByteString -> ByteString Source #
putOID :: [Integer] -> ByteString Source #