Codec.ASN1

| Crypto-3.0.3: DES, Blowfish, AES, SHA1, MD5, RSA, X.509 Identity and Attribute Certificates, General ASN.1 Support, Base64, PKCS8, PKCS1v15, Hexdump, Support for Word128, Word192 and Word256 and Beyond, PKCS5 Padding, Various Encryption Modes e.g. Cipher Block Chaining all in one package. | Contents | Index
Codec.ASN1 |
Portability | portable
Stability | experimental
Maintainer | dominic.steinitz@blueyonder.co.uk
Contents
Types Haskell Equivalences of Base ASN.1 Types Modifiers and Accessor Functions Base ASN.1 Type Definitions Auxilliary ASN.1 Type Definitions Association Table of Types and OIDs
Description
Typecheck and decode an abstract BER representations (as, for example, produced by Codec.ASN1.TLV).
Synopsis
data TagType
= Universal
| Application
| Context
| Private
type TagValue = Integer
data TagPlicity
= Implicit
| Explicit
data AbsPrimType
= AbsVisibleString
| AbsPrintableString
| AbsIA5String
| AbsBool
| AbsInteger
| AbsOID
| AbsNull
| AbsOctetString
| AbsBitString
data AbstractType
= AbsBasePrim TagType TagValue AbsPrimType
| AbsRef TagType TagValue TagPlicity TypeDefn
| AbsSeq TagType TagValue TagPlicity [ComponentType]
| AbsSeqOf TagType TagValue TagPlicity TypeDefn
| AbsSetOf TagType TagValue TagPlicity TypeDefn
| AbsChoice [(TagPlicity, NamedType)]
| AbsAnyDefBy ComponentIndex
data TypeDefn = (::=) String AbstractType
data TaggedType = (:@:) (Maybe TagValue) TypeDefn
data NamedType = (:>:) (Maybe String) TaggedType
data ComponentType
= Regular NamedType
| Optional NamedType
| Default NamedType [Octet]
| AnyDefBy ComponentIndex
data VisibleString = VisibleString String
data PrintableString = PrintableString String
data IA5String = IA5String String
data DirectoryString
= VS VisibleString
| PS PrintableString
| IA IA5String
newtype OID = OID [Integer]
data NULL
data OctetString = OctetString [Octet]
data BitString = BitString [Octet]
data SetOf a = SetOf [a]
modName :: String -> TypeDefn -> TypeDefn
getAbsType :: TypeDefn -> AbstractType
modTagType :: Tagged a => TagType -> a -> a
modTagVal :: Tagged a => Maybe TagValue -> a -> a
absRefedType :: AbstractType -> AbstractType
absSeqComponents :: AbstractType -> [AbstractType]
absSeqOfType :: AbstractType -> AbstractType
absSetOfType :: AbstractType -> AbstractType
namedTypeAbstract :: NamedType -> AbstractType
unVisibleString :: VisibleString -> String
unDirectoryString :: DirectoryString -> String
unSetOf :: SetOf a -> [a]
absVisibleString :: TypeDefn
absPrintableString :: TypeDefn
absIA5String :: TypeDefn
absInteger :: TypeDefn
absOID :: TypeDefn
absNull :: TypeDefn
absOctetString :: TypeDefn
absBitString :: TypeDefn
commonName :: TypeDefn
organizationUnitName :: TypeDefn
emailAddress :: TypeDefn
domainComponent :: TypeDefn
oids :: Map OID TypeDefn
Types
data TagType
Constructors
Universal |
Application |
Context |
Private |
Instances
Enum TagType
Eq TagType
Show TagType
type TagValue = Integer
data TagPlicity
Constructors
Implicit |
Explicit |
Instances
Eq TagPlicity
Show TagPlicity
data AbsPrimType
Constructors
AbsVisibleString |
AbsPrintableString |
AbsIA5String |
AbsBool |
AbsInteger |
AbsOID |
AbsNull |
AbsOctetString |
AbsBitString |
Instances
Eq AbsPrimType
Show AbsPrimType
data AbstractType
Constructors
AbsBasePrim TagType TagValue AbsPrimType |
AbsRef TagType TagValue TagPlicity TypeDefn |
AbsSeq TagType TagValue TagPlicity [ComponentType] |
AbsSeqOf TagType TagValue TagPlicity TypeDefn |
AbsSetOf TagType TagValue TagPlicity TypeDefn |
AbsChoice [(TagPlicity, NamedType)] |
AbsAnyDefBy ComponentIndex |
Instances
Eq AbstractType
Show AbstractType
Tagged AbstractType
data TypeDefn
Constructors
(::=) String AbstractType |
Instances
Eq TypeDefn
Show TypeDefn
Tagged TypeDefn
data TaggedType
Constructors
(:@:) (Maybe TagValue) TypeDefn |
Instances
Eq TaggedType
Show TaggedType
Tagged TaggedType
data NamedType
Constructors
(:>:) (Maybe String) TaggedType |
Instances
Eq NamedType
Show NamedType
Tagged NamedType
data ComponentType
Constructors
Regular NamedType |
Optional NamedType |
Default NamedType [Octet] |
AnyDefBy ComponentIndex |
Instances
Eq ComponentType
Show ComponentType
Haskell Equivalences of Base ASN.1 Types
data VisibleString
Constructors
VisibleString String |
Instances
Encode VisibleString
Eq VisibleString
Show VisibleString
data PrintableString
Constructors
PrintableString String |
Instances
Encode PrintableString
Eq PrintableString
Show PrintableString
data IA5String
Constructors
IA5String String |
Instances
Encode IA5String
Eq IA5String
Show IA5String
data DirectoryString
Constructors
VS VisibleString |
PS PrintableString |
IA IA5String |
Instances
Encode DirectoryString
Eq DirectoryString
Show DirectoryString
newtype OID
Constructors
OID [Integer] |
Instances
Encode OID
Eq OID
Ord OID
Show OID
data NULL
Instances
Eq NULL
Show NULL
data OctetString
Constructors
OctetString [Octet] |
Instances
Encode OctetString
Eq OctetString
Show OctetString
data BitString
Constructors
BitString [Octet] |
Instances
Encode BitString
Eq BitString
Show BitString
data SetOf a
Constructors
SetOf [a] |
Instances
Encode a => Encode (SetOf a)
??? a => Eq (SetOf a)
??? a => Show (SetOf a)
Modifiers and Accessor Functions
modName :: String -> TypeDefn -> TypeDefn
Create a new type definition from an existing one.
getAbsType :: TypeDefn -> AbstractType
modTagType :: Tagged a => TagType -> a -> a
modTagVal :: Tagged a => Maybe TagValue -> a -> a
absRefedType :: AbstractType -> AbstractType
Get the component of a referenced type.
absSeqComponents :: AbstractType -> [AbstractType]
Get the components of a SEQUENCE.
absSeqOfType :: AbstractType -> AbstractType
Get the component of the SEQUENCE OF.
absSetOfType :: AbstractType -> AbstractType
Get the component of the SET OF.
namedTypeAbstract :: NamedType -> AbstractType
unVisibleString :: VisibleString -> String
unDirectoryString :: DirectoryString -> String
unSetOf :: SetOf a -> [a]
Base ASN.1 Type Definitions
absVisibleString :: TypeDefn
absPrintableString :: TypeDefn
absIA5String :: TypeDefn
absInteger :: TypeDefn
absOID :: TypeDefn
absNull :: TypeDefn
absOctetString :: TypeDefn
absBitString :: TypeDefn
Auxilliary ASN.1 Type Definitions
commonName :: TypeDefn
organizationUnitName :: TypeDefn
emailAddress :: TypeDefn
domainComponent :: TypeDefn
Association Table of Types and OIDs
oids :: Map OID TypeDefn
Produced by Haddock version 0.8