OCTET STRING Type

12-1
The OCTET STRING type is used to contain any data where no formatting is required.

External Form -- Input and Output

Any data is accepted and returned unchanged.

Local Form and Behavior

Data is stored as is. If the component has a fixed length exceeding that of the input string, the data is left aligned, and all unreferenced bytes are set to X’00’. If the component cannot contain the number of input bytes supplied, the string is truncated.

Named Values

Named values are not applicable to the OCTET STRING type.

Constraints

The SIZE keyword can be used to constrain the length of an octet string to a certain range or value. Length is measured in bytes. For example:
OCTET STRING (SIZE(4..8))
If the component is variable length, a type check error occurs if the size constraints are breached.