# typepki-oiddb

> Object Identifier (OID) database for TypePKI library (beta)

Latest version **0.4.1** (published 2024-07-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install typepki-oiddb
pnpm add typepki-oiddb
yarn add typepki-oiddb
bun add typepki-oiddb
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2024-07-06 |
| First published | 2024-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 37 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kenji Urushima |
| Maintainers | kjur |
| Keywords | oid, x500, x509, asn1, der, object, identifier, database |

## Links

- npm: https://www.npmjs.com/package/typepki-oiddb
- Repository: https://github.com/kjur/typepki-oiddb
- Homepage: https://kjur.github.io/typepki-oiddb
- Issues: https://github.com/kjur/typepki-oiddb/issues
- npm.io page: https://npm.io/package/typepki-oiddb

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2024-07-06
- 0.4.0 — 2024-07-06
- 0.3.1 — 2024-06-22
- 0.3.0 — 2024-06-22
- 0.2.0 — 2024-05-18
- 0.1.0 — 2024-05-17

## README

typepki-oiddb: Object Identifier (OID) database and utilities for TypePKI Library
=================================================================================

[TOP](https://kjur.github.io/typepki-oiddb/) | [github](https://github.com/kjur/typepki-oiddb) | [npm](https://www.npmjs.com/package/typepki-oiddb) | [TypePKI](https://kjur.github.io/typepki/) 

The 'TypePKI' library is an opensource free TypeScript PKI library which is the successor of the long lived [jsrsasign](https://kjur.github.io/jsrsasign) library.

The 'typepki-oiddb' is a Object Identifier (OID) database and utilities for TypePKI Library.

## FEATURE
- singleton OID database
- Dual CommonJS/ES module package supporting CommonJS(CJS) and ES modules

## Usage
```ts
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"
```

## "typepki-oiddb" Bulitin OID registration

There are two builtin OID data set:

- OIDSET_CRYPTO - OIDs for common cryptographic algorithms and parameters
- OIDSET_X509 - common OIDs for X.509 certificates, CRLs and extensions

## OID data sets published

There is no data sets for now but they will be published near in the future.

## Custom OID registration

```ts
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:

```ts
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"
```

---
_Source: https://npm.io/package/typepki-oiddb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
