Skip to main content
Version: v0.0.8

Interface: DeidRegistrySpec

Specification for createDeidRegistry. Mirrors DeidContextSpec minus the per-patient scope - the registry mints patient scopes itself via DeidRegistry.forPatient.

Example

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

const registry = createDeidRegistry({ key: process.env.DEID_KEY! });

Properties

dateShiftSeed?

readonly optional dateShiftSeed?: string | Uint8Array<ArrayBufferLike>

A separate seed for deriving per-patient date-shift offsets. Defaults to the key when omitted; supply a distinct seed to decouple pseudonymization from date-shifting.


key

readonly key: string | Uint8Array<ArrayBufferLike>

The HMAC key for keyed transforms. Consumer-held; never emitted. Must be non-empty.


maxShiftDays?

readonly optional maxShiftDays?: number

Absolute bound (days) on each derived per-patient date-shift offset. Defaults to 365.