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.
Example
Section titled “Example”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"Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OidRegistry():
OidRegistry
Returns
Section titled “Returns”OidRegistry
Methods
Section titled “Methods”entries()
Section titled “entries()”entries():
IterableIterator<OidRegistryEntry>
Defined in: packages/format-oid/src/registry.ts:96
Returns an iterator over all registered entries.
Returns
Section titled “Returns”IterableIterator<OidRegistryEntry>
formatName()
Section titled “formatName()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”string
lookup()
Section titled “lookup()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”OidRegistryEntry | undefined
lookupByDotted()
Section titled “lookupByDotted()”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.
Parameters
Section titled “Parameters”dotted
Section titled “dotted”string
Returns
Section titled “Returns”OidRegistryEntry | undefined
lookupByName()
Section titled “lookupByName()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”OidRegistryEntry | undefined
register()
Section titled “register()”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.
Parameters
Section titled “Parameters”dotted
Section titled “dotted”string
string
description?
Section titled “description?”string
Returns
Section titled “Returns”void
Throws
Section titled “Throws”If dotted is not a valid OID string.