Function asn1oidcanon

  • canonicalize parsed ASN.1 ObjectIdentifier value to oid numbers

    Parameters

    • pValue: Record<string, string>

      parsed ASN.1 value of ObjectIdentifier

    Returns string

    a string of ObjectIdentifier value (ex. "1.2.3.4")

    See

    OIDDataBase.nametooid

    Example

    asn1oidcanon({oid: "P-256"}) -> "1.2840.10045.3.1.7"
    asn1oidcanon{{oid: "prime256v1"}) -> "1.2840.10045.3.1.7"
    asn1oidcanon({oid: "ecPublicKey"}) -> "1.2.840.10045.2.1"
    asn1oidcanon({oid: "1.2.3.4"}) -> "1.2.3.4"