Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | Safe-Infered |
A module containing raw ASN1 serialization/derialization tools
- data ASN1Class
- = Universal
- | Application
- | Context
- | Private
- type ASN1Tag = Int
- data ASN1Length
- data ASN1Header = ASN1Header !ASN1Class !ASN1Tag !Bool !ASN1Length
- data ASN1Err
- data ASN1Event
- iterateFile :: FilePath -> Iteratee ASN1Event IO a -> IO (Either SomeException a)
- iterateByteString :: Monad m => ByteString -> Iteratee ASN1Event m a -> m (Either SomeException a)
- enumReadBytes :: Monad m => Enumeratee ByteString ASN1Event m a
- enumWriteBytes :: Monad m => Enumeratee ASN1Event ByteString m a
- toBytes :: [ASN1Event] -> ByteString
- getHeader :: ByteString -> Either ASN1Err ASN1Header
- putHeader :: ASN1Header -> ByteString
ASN1 definitions
data ASN1Length Source
data ASN1Header Source
Enumerator events
Header ASN1Header | ASN1 Header |
Primitive !ByteString | Primitive |
ConstructionBegin | Constructed value start |
ConstructionEnd | Constructed value end |
iterateFile :: FilePath -> Iteratee ASN1Event IO a -> IO (Either SomeException a)Source
iterate over a file using a file enumerator.
iterateByteString :: Monad m => ByteString -> Iteratee ASN1Event m a -> m (Either SomeException a)Source
iterate over a lazy bytestring using a list enumerator over the bytestring chunks.
enumReadBytes :: Monad m => Enumeratee ByteString ASN1Event m aSource
enumReadBytes parse bytestring and generate asn1event.
enumWriteBytes :: Monad m => Enumeratee ASN1Event ByteString m aSource
write Bytes of events enumeratee
toBytes :: [ASN1Event] -> ByteStringSource
serialize asn1 headers
putHeader :: ASN1Header -> ByteStringSource
putIdentifier encode an ASN1 Identifier into a marshalled value