pub type OctetStringFmt = Tail;Expand description
ASN.1 OCTET STRING contents format (primitive).
This content format intentionally handles only primitive bytes. Recursive
constructed BER OCTET STRINGs are provided by
ber::BerOctetStringFmt.
For example, a constructed encoding may have the following shape:
§Example
24 80 04 03 42 45 52 24 80 04 01 2D 04 05 52 55 4C 45 53 00 00 00 00 │ │ │ │ └───────┘ │ │ │ │ │ │ │ └──────────────┘ │ │ │ │ │ │ “BER” │ │ │ │ │ │ └─ Len: 5 “RULES” │ └─ Outer EOC │ │ │ └─ Len: 3 │ │ │ │ │ └─ Primitive └─ Inner EOC │ │ └─ Primitive │ │ │ │ └─ “-” │ └─ Indefinite │ │ │ └─ Len: 1 └─ Outer Outer │ │ └─ Primitive │ └─ Indefinite └─ Inner Constructed
[TAG: 24] Constructed OCTET STRING (Indefinite Length) │ ├── [TAG: 04] Primitive OCTET STRING (Definite Length: 3) │ └── Value: “BER” (Hex: 42 45 52) │ ├── [TAG: 24] Constructed OCTET STRING (Indefinite Length) │ │ │ ├── [TAG: 04] Primitive OCTET STRING (Definite Length: 1) │ │ └── Value: “-” (Hex: 2D) │ │ │ ├── [TAG: 04] Primitive OCTET STRING (Definite Length: 5) │ │ └── Value: “RULES” (Hex: 52 55 4C 45 53) │ │ │ └── [TAG: 00] End-of-Contents (EOC) Marker (Hex: 00 00) │ └── Meaning: Closes the Inner Constructed String │ └── [TAG: 00] End-of-Contents (EOC) Marker (Hex: 00 00) └── Meaning: Closes the Outer Constructed String
Aliased Type§
pub struct OctetStringFmt;