UNPKG

@videosdk.live/js-sdk

Version:

<h1 align="center"> <img src="https://static.videosdk.live/videosdk_logo_website_black.png"/><br/> <p align="center"> Video SDK for JavaScript<br/> <a href="https://videosdk.live/">videosdk.live</a> </p> </h1>

51 lines (46 loc) 1.27 kB
/** * Configuration options for the ExternalE2EEKeyProvider */ interface E2EEKeyProviderOptions { /** * Window size for key ratcheting * @default 0 */ ratchetWindowSize?: number; /** * Tolerance for decryption failures * @default -1 */ failureTolerance?: number; /** * Whether to discard frames when cryptor is not ready * @default false */ discardFrameWhenCryptorNotReady?: boolean; } /** * Provider for managing end-to-end encryption keys with shared passphrase * between all participants * @experimental */ export class ExternalE2EEKeyProvider { /** * Creates a new ExternalE2EEKeyProvider instance * @param options - Configuration options */ constructor(options?: E2EEKeyProviderOptions); /** * Sets the shared encryption key for all participants * @param key - Either a string passphrase (uses PBKDF2) or an ArrayBuffer of random bytes (uses HKDF) * @returns Promise that resolves when the key is set */ setSharedKey(key: string | ArrayBuffer): Promise<void>; /** * Gets the current encryption keys */ getKeys(): Array<{ key: CryptoKey; participantIdentity?: string; keyIndex?: number; }>; }