UNPKG

averox-sdk-secure

Version:

Real-time SDK for key monitoring, secure messaging, and A/V streaming with encryption

33 lines (32 loc) 922 B
import { EventEmitter } from 'events'; export interface KeyMetadata { createdAt: Date; lastRotated: Date; compromised: boolean; usageCount: number; } export declare class KeyManager extends EventEmitter { private keys; private metadata; private readonly logger; constructor(); generateKey(type: string): string; rotateKey(type: string): string; getKey(type: string): string | undefined; markKeyAsCompromised(type: string): void; getKeyMetadata(type: string): KeyMetadata | undefined; onKeyGenerated(callback: (data: { type: string; timestamp: Date; }) => void): void; onKeyRotated(callback: (data: { type: string; oldKey: string | undefined; newKey: string; timestamp: Date; }) => void): void; onKeyCompromised(callback: (data: { type: string; timestamp: Date; }) => void): void; }