Simple types in ASN.1 consist of the following:
BOOLEAN
INTEGER
BIT STRING
OCTET STRING
NULL
OBJECT IDENTIFIER
REAL
ENUMERATED
UTF8String
RELATIVE-OID
NumericString
PrintableString
TeletexString
VideotexString
IA5String
UTCTime
GeneralizedTime
GraphicString
VisibleString
GeneralString
Each simple type is mapped to a corresponding string representation
of the input data. This is a relatively straightforward conversion. Of
special note, we use the BOOLEAN
values
"TRUE" (for any hex octet not equal to
0x00
) and "FALSE" (for any hex octet
equal to 0x00
). NULL
values are outputted
simply as "NULL."
Simple type mappings require no extra logic for output. Their textual representations are generally quite straightforward. Mapping complex types, however, is more difficult.