@inngest/middleware-encryption
Version:
E2E encryption middleware for Inngest.
19 lines (18 loc) • 745 B
TypeScript
import { type EncryptionService } from "../middleware";
/**
* The default encryption service used by the encryption middleware.
*
* This service uses LibSodium to encrypt and decrypt data. It supports multiple
* keys, so that you can rotate keys without breaking existing encrypted data.
*
* An option is also provided to encrypt with a previous methodology, allowing
* you to transition all services to using this new strategy before removing the
* flag.
*/
export declare class LibSodiumEncryptionService implements EncryptionService {
private readonly keys;
identifier: string;
constructor(key: string | string[] | undefined);
encrypt(value: unknown): Promise<string>;
decrypt(value: string): Promise<unknown>;
}