BasicEncodingRulesElement.this

Creates a BERElement from the supplied bytes, inferring that the first byte is the type tag. The supplied ubyte[] array is read, starting from the index specified by bytesRead, and increments bytesRead by the number of bytes read.

  1. this(ASN1TagClass tagClass, ASN1Construction construction, size_t tagNumber)
  2. this(ubyte[] bytes)
  3. this(ubyte[] bytes)
  4. this(size_t bytesRead, ubyte[] bytes)
    class BasicEncodingRulesElement
    @system
    this
    (
    ref size_t bytesRead
    ,
    in ubyte[] bytes
    )

Throws

All of the same exceptions as fromBytes()

Examples

// Decoding looks like:
BERElement[] result;
size_t i = 0u;
while (i < bytes.length)
    result ~= new BERElement(i, bytes);

// Encoding looks like:
ubyte[] result;
foreach (bv; bervalues)
{
    result ~= cast(ubyte[]) bv;
}

Meta