Chapter 5. Generated BER/DER/CER Encode Methods

Table of Contents

Memory-buffer Based Definite Length Encoders
Stream-Oriented Indefinite Length Encode Methods

Two different types of BER (Basic Encoding Rules) encode methods may be generated using the ASN1C compiler:

For DER (Distinguished Encoding Rules), only the first option is available because a requirement of DER is that all lengths must be in definite form. For CER (Canonical Encoding Rules), only the second option is available because all constructed element lengths must be in indefinite length form. Each of these methods are described in the following sections.