/** * API Encryption Constants * * Centralized constants for API encryption configuration. * Uses Web Crypto API compatible algorithms. * * @module config/api/encryption */ import type { EncryptionAlgorithm, KeyFormat, EncryptionKey, EncryptionConfig } from '@plyaz/types/api'; /** * Default encryption configuration values for API clients */ export declare const API_ENCRYPTION_DEFAULTS: { /** Default algorithm - AES-GCM is recommended for Web Crypto API */ readonly ALGORITHM: EncryptionAlgorithm; /** Default key format */ readonly KEY_FORMAT: KeyFormat; /** Default key ID for frontend clients */ readonly FRONTEND_KEY_ID: "frontend-key"; /** Default key ID for backend clients */ readonly BACKEND_KEY_ID: "backend-key"; }; /** * Create a default encryption key configuration * * @param key - The encryption key (base64 encoded) * @param options - Optional overrides * @returns EncryptionKey configuration * * @example * ```ts * const encryptionKey = createDefaultEncryptionKey(process.env.API_ENCRYPTION_KEY!); * ``` */ export declare function createDefaultEncryptionKey(key: string, options?: { id?: string; format?: KeyFormat; algorithm?: EncryptionAlgorithm; }): EncryptionKey; /** * Create the full encryption configuration for API clients * * @param key - The encryption key (base64 encoded) * @param options - Optional overrides for key and config * @returns Full EncryptionConfig ready for use * * @example * ```ts * // Basic usage * const encryptionConfig = createEncryptionConfig(process.env.API_ENCRYPTION_KEY!); * * // With overrides * const encryptionConfig = createEncryptionConfig(key, { * algorithm: 'AES-CBC', * keyId: 'custom-key-id', * }); * ``` */ export declare function createEncryptionConfig(key: string, options?: { algorithm?: EncryptionAlgorithm; keyId?: string; keyFormat?: KeyFormat; }): EncryptionConfig; //# sourceMappingURL=encryption.d.ts.map