This type is used to model information made of ordered sequence of octets (8-bit bytes). It can by of any non-negative length. As for internal information, there is no notational support as in BIT STRING type.
There are two value notations available - binary and hexadecimal. Both are right padded with zeros to be a multiply of eight. Octets are then taken from left, with most significant bit at very left. Following examples define the same octet string:
os1 OCTET STRING ::= '000010101110000111'B
os2 OCTET STRING ::= '000010101110000111000000'B
os3 OCTET STRING ::= '0AE1C'H
os4 OCTET STRING ::= '0AE1C0'H
There are also some forms of subtyping alowed, they are the same as with bit strings except that numbers mean octets:
AtLeastOneOctet ::= OCTET STRING (SIZE (1..MAX))
RestrictedLength ::= OCTET STRING (SIZE (0..255))