Module asn1_cereal::ber::enc
[−]
[src]
Encoding rules to use for BER.
This module provides encoding rules that can be used with
the BerSerialize
and BerDerserialize
traits.
use asn1_cereal::{BerSerialize, DER}; let mut bytes: Vec<u8> = Vec::new(); let _ = BerSerialize::serialize_enc(&4u64, DER, &mut bytes);
Structs
BER |
Basic Encoding Rules define the most basic rules that can be used to encode an ASN.1 tag. These are the default encoding rules used when decoding ASN1, as all variants are valid BER. |
BERAlt |
This set of rules creates a valid BER stream, but will use implicit tags where possible, and indefinite length encoding for all constructed elements. |
DER |
Distinguished Encoding Rules are a subset of BER, and provide a deterministic, shortest form of encoding. These are the default encoding rules used when encoding ASN.1. |
Enums
LenEnc |
An enum which determines how lengths are encoded. |
TagEnc |
An enum which determines how tags are encoded. |
Traits
BerEncRules |
A trait to define encoding rules to use while encoding ASN.1. |