UNPKG

asn1-ts

Version:

ASN.1 encoding and decoding, including BER, CER, and DER.

12 lines (11 loc) 325 B
import BERElement from "../../ber.mjs"; export default function decodeSequence(value) { const encodedElements = []; let i = 0; while (i < value.length) { const next = new BERElement(); i += next.fromBytes(value.subarray(i)); encodedElements.push(next); } return encodedElements; }