Skip to content

derOid ​

derOid ​

Encodes a dotted-decimal OID string as a DER OBJECT IDENTIFIER (tag 0x06).

Validates arc constraints per X.660 §7.6: the root arc must be 0–2, and under roots 0 and 1 the second arc must be 0–39. X.690 §8.19.4 defines the (X*40)+Y packing of the first two arcs into one subidentifier.
Sub-identifiers are encoded with base-128 continuation.

ts
function derOid(
	oid: string,
): Uint8Array

Parameters

  • oid: string

Released under the MIT License.