Primitive Types
The following primitive ASN.1 types are available as Python classes in the
synta package. Each section below links to the detailed API reference.
Numeric types
See Numeric Types for full API reference.
String types
| Class | ASN.1 type | Tag | Character set |
|---|---|---|---|
Utf8String | UTF8String | 0x0c | Unicode |
PrintableString | PrintableString | 0x13 | Restricted ASCII |
IA5String | IA5String | 0x16 | ASCII (0x00–0x7f) |
NumericString | NumericString | 0x12 | Digits and space |
TeletexString | TeletexString / T61String | 0x14 | Arbitrary bytes (Latin-1 decode) |
VisibleString | VisibleString | 0x1a | Printable ASCII |
GeneralString | GeneralString | 0x1b | Arbitrary bytes (Latin-1 decode) |
UniversalString | UniversalString | 0x1c | UCS-4 big-endian |
BmpString | BMPString | 0x1e | UCS-2 big-endian (BMP only) |
See String Types for full API reference.
Time types
| Class | ASN.1 type | Tag |
|---|---|---|
UtcTime | UTCTime | 0x17 |
GeneralizedTime | GeneralizedTime | 0x18 |
See Time Types for full API reference.
Bit and octet strings
| Class | ASN.1 type | Tag |
|---|---|---|
OctetString | OCTET STRING | 0x04 |
BitString | BIT STRING | 0x03 |
See Bit and Octet Strings for full API reference.
Tagged and raw elements
| Class | Description |
|---|---|
TaggedElement | Returned by decode_any() for explicitly-tagged or application/private-tagged values. |
RawElement | Returned by decode_any() for unknown universal tags. |
See Tagged and Raw Elements for full API reference.