Handling of data in Basic Encoding Rules.
This crate allows decoding and encoding of data encoded in ASN.1’s Basic Encoding Rules as defined in ITU recommendation X.690 as well as their stricter companions Cannonical Encoding Rules and Distringuished Encoding Rules.
You will find a short introduction to ASN.1 and encoding rules as well as a discussion of how decoding and encoding with the crate work in the guide module. The documentation with all the other modules serves as a reference documentation.
Additionally, the crate provides a number of types that help dealing with the more complex universal types in ASN.1. Specifically, the module int provides variable length integers, the module string contains types for the various kinds of strings defined in ASN.1, and oid deals with object identifiers. Finally, captured provides a way to keep encoded data around for later processing. The most important types from these modules are also re-exported at library level.
Captured BER-encoded data.
Macros for last-resort debugging.
Parsing BER-encoded data.
Encoding data in BER.
Getting started with the ber crate.
ASN.1 Object Identifiers.
BER encoding for various strings types.
A bit string value.
An octet string value.
The tag of a BER encoded value.
The BER Mode.
A restricted character string containing ASCII characters.
A restricted character string containing only digits and spaces.
A restricted character string allowing a subset of ASCII characters.
A restricted character string containing UTF-8 encoded characters.