Function asn1parse

  • parse ASN.1 hexadecimal string

    Parameters

    • h: string

      ASN.1 hexadecimal string

    • Optional opt: ASN1ParseOption

      optional ASN.1 parsing opiton

    Returns Record<string, any>

    parsed ASN.1 as Record object

    Example

    asn1parse("300602010a02010b") -> {
    t: "seq",
    v: [
    { t: "int", v: "0a" },
    { t: "int", v: "0b" },
    ]
    }