The 'TypePKI' library is an opensource free TypeScript PKI library which is the successor of the long lived jsrsasign library.
The 'typepki-oiddb' is a Object Identifier (OID) database and utilities for TypePKI Library.
import { OIDDataBase, OIDSET_CRYPTO, OIDSET_X509 } from "typepki-oiddb";
const oiddb = OIDDatabase.instance; // singleton object
oiddb.regist([OIDSET_CRYPTO, OIDSET_X509]);
oiddb.oidtoname("2.5.29.15") -> "keyUsage"
There are two builtin OID data set:
There is no data sets for now but they will be published near in the future.
import { OIDDataBase, OIDDataSet, OIDSET_CRYPTO, OIDSET_X509 } from "typepki-oiddb";
const oiddb = OIDDatabase.instance; // singleton object
oiddb.regist([OIDSET_CRYPTO, OIDSET_X509]);
When you want to add some OID name definitions, you can do it like this:
const MYOIDSET: OIDDataSet = {
setname: "myoid",
nametooid: {
"my-oid-one": "1.2.3.4.5.1",
"my-oid-two": "1.2.3.4.5.2",
},
};
oiddb.regist([MYOIDSET]);
oiddb.nametooid("my-oid-two") -> "1.2.3.4.5.2"