Skip to content

OidRegistry

Defined in: packages/format-oid/src/registry.ts:44

Associates OID values with human-readable names.

Instantiate a custom registry for application-specific OIDs, or use the exported wellKnownOidRegistry for common PKI, PKCS, and X.500 OIDs.

const registry = new OidRegistry();
registry.register(
"1.3.6.1.4.1.99999.1",
"myApp-version",
"Application version",
);
console.log(registry.formatName([1, 3, 6, 1, 4, 1, 99999, 1])); // "myApp-version"

new OidRegistry(): OidRegistry

OidRegistry

entries(): IterableIterator<OidRegistryEntry>

Defined in: packages/format-oid/src/registry.ts:96

Returns an iterator over all registered entries.

IterableIterator<OidRegistryEntry>


formatName(oid): string

Defined in: packages/format-oid/src/registry.ts:91

Returns the registered short name for oid, or its dotted decimal string if the OID is not in this registry.

ObjectIdentifier

string


lookup(oid): OidRegistryEntry | undefined

Defined in: packages/format-oid/src/registry.ts:70

Looks up a registry entry by OID components. Returns undefined if the OID is not registered.

ObjectIdentifier

OidRegistryEntry | undefined


lookupByDotted(dotted): OidRegistryEntry | undefined

Defined in: packages/format-oid/src/registry.ts:62

Looks up a registry entry by dotted decimal OID string. Returns undefined if the OID is not registered.

string

OidRegistryEntry | undefined


lookupByName(name): OidRegistryEntry | undefined

Defined in: packages/format-oid/src/registry.ts:78

Finds the first registered entry whose name exactly matches name. Returns undefined if no entry has that name.

string

OidRegistryEntry | undefined


register(dotted, name, description?): void

Defined in: packages/format-oid/src/registry.ts:53

Registers an OID with a short name and optional description. Overwrites any existing entry for the same OID.

string

string

string

void

If dotted is not a valid OID string.