DistinguishedEncodingRulesElement.this

Creates a DERElement 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 DistinguishedEncodingRulesElement
    @system
    this
    (
    ref size_t bytesRead
    ,
    in ubyte[] bytes
    )

Throws

All of the same exceptions as fromBytes()

Examples

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

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

Meta