HEX STRING Type

12-1
The HEX STRING type is an Mapping Services extension to ASN.1, but is processed as a base ASN.1 type. It is identical in all respects to the ASN.1 OCTET STRING type except for its external form representation.

External Form -- Input

Valid input consists of a string of one or more local characters, each selected from the set 0123456789ABCDEF. Each pair of hexadecimal characters represents a single byte value. If an odd number of characters is supplied, the string is treated as though padded on the left with a single zero (0).

External Form -- Output

Data is returned in hexadecimal characters, as for input. An even number of characters is always returned.

Local Form and Behavior

Each two hexadecimal characters of input represents the actual data to be stored in a single byte. Otherwise, behavior is as for OCTET STRING.

Named Values

Named values are not applicable to the HEX STRING type.

Constraints

The SIZE keyword can be used to limit the size of a HEX STRING type. The size refers to the length of the local form, not external form.