[][src]Crate bcder

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.

The most important modules of the crate are decode and encode that provide the machinery for implementing decoding and encoding of data.

Additionally, the crate provides a number of types that help dealing with the more difficult 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.

Re-exports

pub use self::int::Integer;
pub use self::int::Unsigned;
pub use self::oid::ConstOid;
pub use self::oid::Oid;

Modules

debug

Macros for last-resort debugging.

decode

Parsing BER-encoded data.

encode

Encoding data in BER.

guide

Getting started with the ber crate.

int

Unbounded integers.

oid

ASN.1 Object Identifiers.

string

BER encoding for various strings types.

Macros

xerr

Structs

BitString

A bit string value.

Captured

A wrapper for BER encoded data.

OctetString

An octet string value.

Tag

The tag of a BER encoded value.

Enums

Mode

The BER Mode.

Type Definitions

Ia5String

A restricted character string containing ASCII characters.

NumericString

A restricted character string containing only digits and spaces.

PrintableString

A restricted character string allowing a subset of ASCII characters.

Utf8String

A restricted character string containing UTF-8 encoded characters.