Skip to main content
Version: v0.0.6

Function: createDeidRegistry()

createDeidRegistry(spec): DeidRegistry

Create a DeidRegistry from consumer-held key material. Fails closed on an absent/empty key - there is no default or weak key (the underlying createDeidContext throws DEID_NO_KEY). The key is stored only in the module-private state, never on the returned handle.

Parameters

spec

DeidRegistrySpec

The key, optional date-shift seed, and optional offset bound.

Returns

DeidRegistry

An opaque, self-redacting corpus consistency handle.

Throws

DeidError with code DEID_NO_KEY if the key (or an explicit seed) is empty.

Example

import { createDeidRegistry } from "@cosyte/deid";

const registry = createDeidRegistry({ key: "consumer-secret" });