asn1-types-0.3.4: ASN.1 types
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell98

Data.ASN1.Types

Description

 
Synopsis

Documentation

data ASN1 Source #

Define high level ASN1 object.

Constructors

Boolean Bool 
IntVal Integer 
BitString BitArray 
OctetString ByteString 
Null 
OID OID 
Real Double 
Enumerated Integer 
ASN1String ASN1CharacterString 
ASN1Time ASN1TimeType DateTime (Maybe TimezoneOffset) 
Other ASN1Class ASN1Tag ByteString 
Start ASN1ConstructionType 
End ASN1ConstructionType 

Instances

Instances details
Eq ASN1 Source # 
Instance details

Defined in Data.ASN1.Types

Methods

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

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

Show ASN1 Source # 
Instance details

Defined in Data.ASN1.Types

Methods

showsPrec :: Int -> ASN1 -> ShowS

show :: ASN1 -> String

showList :: [ASN1] -> ShowS

type ASN1S = [ASN1] -> [ASN1] Source #

represent a chunk of ASN1 Stream. this is equivalent to ShowS but for an ASN1 Stream.

data ASN1Class Source #

Element class

Instances

Instances details
Enum ASN1Class Source # 
Instance details

Defined in Data.ASN1.Types.Lowlevel

Eq ASN1Class Source # 
Instance details

Defined in Data.ASN1.Types.Lowlevel

Methods

(==) :: ASN1Class -> ASN1Class -> Bool

(/=) :: ASN1Class -> ASN1Class -> Bool

Ord ASN1Class Source # 
Instance details

Defined in Data.ASN1.Types.Lowlevel

Methods

compare :: ASN1Class -> ASN1Class -> Ordering

(<) :: ASN1Class -> ASN1Class -> Bool

(<=) :: ASN1Class -> ASN1Class -> Bool

(>) :: ASN1Class -> ASN1Class -> Bool

(>=) :: ASN1Class -> ASN1Class -> Bool

max :: ASN1Class -> ASN1Class -> ASN1Class

min :: ASN1Class -> ASN1Class -> ASN1Class

Show ASN1Class Source # 
Instance details

Defined in Data.ASN1.Types.Lowlevel

Methods

showsPrec :: Int -> ASN1Class -> ShowS

show :: ASN1Class -> String

showList :: [ASN1Class] -> ShowS

type ASN1Tag = Int Source #

ASN1 Tag

data ASN1ConstructionType Source #

Define the type of container

Instances

Instances details
Eq ASN1ConstructionType Source # 
Instance details

Defined in Data.ASN1.Types

Show ASN1ConstructionType Source # 
Instance details

Defined in Data.ASN1.Types

Methods

showsPrec :: Int -> ASN1ConstructionType -> ShowS

show :: ASN1ConstructionType -> String

showList :: [ASN1ConstructionType] -> ShowS

data ASN1StringEncoding Source #

Define all possible ASN1 String encoding.

Constructors

IA5

128 characters equivalent to the ASCII alphabet

UTF8

UTF8

General

all registered graphic and character sets (see ISO 2375) plus SPACE and DELETE.

Graphic

all registered G sets and SPACE

Numeric

encoding containing numeric [0-9] and space

Printable

printable [a-z] [A-Z] [()+,-.?:/=] and space.

VideoTex

CCITT's T.100 and T.101 character sets

Visible

International ASCII printing character sets

T61

teletext

UTF32

UTF32

Character

Character

BMP

UCS2

data ASN1TimeType Source #

Different ASN1 time representation

Constructors

TimeUTC

ASN1 UTCTime Type: limited between 1950-2050

TimeGeneralized

ASN1 GeneralizedTime Type

Instances

Instances details
Eq ASN1TimeType Source # 
Instance details

Defined in Data.ASN1.Types

Methods

(==) :: ASN1TimeType -> ASN1TimeType -> Bool

(/=) :: ASN1TimeType -> ASN1TimeType -> Bool

Ord ASN1TimeType Source # 
Instance details

Defined in Data.ASN1.Types

Show ASN1TimeType Source # 
Instance details

Defined in Data.ASN1.Types

Methods

showsPrec :: Int -> ASN1TimeType -> ShowS

show :: ASN1TimeType -> String

showList :: [ASN1TimeType] -> ShowS

class ASN1Object a where Source #

Define an object that can be converted to and from ASN.1

Methods

toASN1 :: a -> ASN1S Source #

transform an object into a chunk of ASN1 stream.

fromASN1 :: [ASN1] -> Either String (a, [ASN1]) Source #

returns either an object along the remaining ASN1 stream, or an error.

asn1CharacterString :: ASN1StringEncoding -> String -> ASN1CharacterString Source #

encode a string into a character string

asn1CharacterToString :: ASN1CharacterString -> Maybe String Source #

try to decode an ASN1CharacterString to a String