asn1-types-0.3.2: ASN.1 types

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | unknown
Safe Haskell | Safe
Language | Haskell98

Data.ASN1.Types.String

Description

Different String types available in ASN1

Synopsis

- data ASN1StringEncoding
  - = IA5
  - | UTF8
  - | General
  - | Graphic
  - | Numeric
  - | Printable
  - | VideoTex
  - | Visible
  - | T61
  - | UTF32
  - | Character
  - | BMP
- data ASN1CharacterString = ASN1CharacterString {
  - characterEncoding :: ASN1StringEncoding
  - getCharacterStringRawData :: ByteString
  }
- asn1CharacterString :: ASN1StringEncoding -> String -> ASN1CharacterString
- asn1CharacterToString :: ASN1CharacterString -> Maybe String

# Documentation

data ASN1StringEncoding #

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

Instances

Eq ASN1StringEncoding # |
Methods (==) :: ASN1StringEncoding -> ASN1StringEncoding -> Bool # (/=) :: ASN1StringEncoding -> ASN1StringEncoding -> Bool #
Ord ASN1StringEncoding # |
Methods compare :: ASN1StringEncoding -> ASN1StringEncoding -> Ordering # (<) :: ASN1StringEncoding -> ASN1StringEncoding -> Bool # (<=) :: ASN1StringEncoding -> ASN1StringEncoding -> Bool # (>) :: ASN1StringEncoding -> ASN1StringEncoding -> Bool # (>=) :: ASN1StringEncoding -> ASN1StringEncoding -> Bool # max :: ASN1StringEncoding -> ASN1StringEncoding -> ASN1StringEncoding # min :: ASN1StringEncoding -> ASN1StringEncoding -> ASN1StringEncoding #
Show ASN1StringEncoding # |
Methods showsPrec :: Int -> ASN1StringEncoding -> ShowS # show :: ASN1StringEncoding -> String # showList :: [ASN1StringEncoding] -> ShowS #

data ASN1CharacterString #

ASN1 Character String with encoding

Constructors

ASN1CharacterString |
Fields characterEncoding :: ASN1StringEncoding getCharacterStringRawData :: ByteString

Instances

Eq ASN1CharacterString # |
Methods (==) :: ASN1CharacterString -> ASN1CharacterString -> Bool # (/=) :: ASN1CharacterString -> ASN1CharacterString -> Bool #
Ord ASN1CharacterString # |
Methods compare :: ASN1CharacterString -> ASN1CharacterString -> Ordering # (<) :: ASN1CharacterString -> ASN1CharacterString -> Bool # (<=) :: ASN1CharacterString -> ASN1CharacterString -> Bool # (>) :: ASN1CharacterString -> ASN1CharacterString -> Bool # (>=) :: ASN1CharacterString -> ASN1CharacterString -> Bool # max :: ASN1CharacterString -> ASN1CharacterString -> ASN1CharacterString # min :: ASN1CharacterString -> ASN1CharacterString -> ASN1CharacterString #
Show ASN1CharacterString # |
Methods showsPrec :: Int -> ASN1CharacterString -> ShowS # show :: ASN1CharacterString -> String # showList :: [ASN1CharacterString] -> ShowS #
IsString ASN1CharacterString # |
Methods fromString :: String -> ASN1CharacterString #

asn1CharacterString :: ASN1StringEncoding -> String -> ASN1CharacterString #

encode a string into a character string

asn1CharacterToString :: ASN1CharacterString -> Maybe String #

try to decode an `ASN1CharacterString` to a String