ASN1EncodableSequence

Implements ASN1Encodable.

Represents an ASN.1 sequence and sequence-of value. Unlike ASN1Sequence, this is represented as an array of ASN1Encodable instead of ASN1Value, which makes it friendlier to use when encoding.

Constructor

function constructor(elements: ASN1Encodable[]): this;

Parameters

  • elements

Methods

Properties

interface Properties {
	class: ASN1Class;
	form: ASN1Form;
	tag: number;
	elements: ASN1Encodable[];
}
  • class
  • type
  • tag
  • elements

Example

import { ASN1EncodableSequence, ASN1Integer } from "@oslojs/asn1";

const sequence = new ASN1EncodableSequence([
	new ASN1Integer(1n),
	new ASN1Integer(10n),
	new ASN1Integer(100n)
]);