Copyright | (c) 2010-2013 Vincent Hanquez <vincent@snarc.org> |
---|---|
License | BSD-style |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Data.ASN1.Encoding
Description
Synopsis
- class ASN1Decoding a where
- decodeASN1 :: a -> ByteString -> Either ASN1Error [ASN1]
- class ASN1DecodingRepr a where
- decodeASN1Repr :: a -> ByteString -> Either ASN1Error [ASN1Repr]
- class ASN1Encoding a where
- encodeASN1 :: a -> [ASN1] -> ByteString
- decodeASN1' :: ASN1Decoding a => a -> ByteString -> Either ASN1Error [ASN1]
- decodeASN1Repr' :: ASN1DecodingRepr a => a -> ByteString -> Either ASN1Error [ASN1Repr]
- encodeASN1' :: ASN1Encoding a => a -> [ASN1] -> ByteString
Generic class for decoding and encoding a stream
class ASN1Decoding a where Source #
Describe an ASN.1 decoding, that transforms a lazy bytestring into a list of ASN.1 values.
Methods
decodeASN1 :: a -> ByteString -> Either ASN1Error [ASN1] Source #
Decode a lazy bytestring into a list of ASN.1 values.
Instances
ASN1Decoding BER Source # | |
Defined in Data.ASN1.BinaryEncoding Methods decodeASN1 :: BER -> ByteString -> Either ASN1Error [ASN1] Source # | |
ASN1Decoding DER Source # | |
Defined in Data.ASN1.BinaryEncoding Methods decodeASN1 :: DER -> ByteString -> Either ASN1Error [ASN1] Source # |
class ASN1DecodingRepr a where Source #
Transition class.
Methods
decodeASN1Repr :: a -> ByteString -> Either ASN1Error [ASN1Repr] Source #
Decode a lazy bytestring into a list of ASN1Repr
pairs.
Instances
ASN1DecodingRepr BER Source # | |
Defined in Data.ASN1.BinaryEncoding Methods decodeASN1Repr :: BER -> ByteString -> Either ASN1Error [ASN1Repr] Source # | |
ASN1DecodingRepr DER Source # | |
Defined in Data.ASN1.BinaryEncoding Methods decodeASN1Repr :: DER -> ByteString -> Either ASN1Error [ASN1Repr] Source # |
class ASN1Encoding a where Source #
Describe an ASN.1 encoding, that transforms a list of ASN.1 values into a lazy bytestring.
Methods
encodeASN1 :: a -> [ASN1] -> ByteString Source #
Encode a list of ASN.1 values into a lazy bytestring.
Instances
ASN1Encoding DER Source # | |
Defined in Data.ASN1.BinaryEncoding Methods encodeASN1 :: DER -> [ASN1] -> ByteString Source # |
Strict bytestring alternatives
decodeASN1' :: ASN1Decoding a => a -> ByteString -> Either ASN1Error [ASN1] Source #
Decode a strict bytestring into a list of ASN.1 values.
decodeASN1Repr' :: ASN1DecodingRepr a => a -> ByteString -> Either ASN1Error [ASN1Repr] Source #
Decode a strict bytestring into a list of ASN1Repr
pairs.
encodeASN1' :: ASN1Encoding a => a -> [ASN1] -> ByteString Source #
Encode a list of ASN.1 values into a strict bytestring.