interface SignRequestParams { method: string; path?: string; ts: number; body: any; nonce: string; secretKey: string; } interface SignRequestHashParams extends Omit { bodyHash: string; } /** * Service for cryptographic operations including data key generation, request signing, and secret key management. * * @remarks * This service provides three main functionalities: * - Generates data keys using AWS KMS with AES-256 encryption * - Signs HTTP requests using HMAC-SHA256 for API authentication * - Retrieves and caches secret keys with Redis for performance optimization * * @example * ```typescript * Generate a new data key * const { ciphertext, secretKey } = await cryptoService.generateDataKey(); * * Sign an API request * const signature = cryptoService.signRequest({ * method: 'POST', * path: '/api/endpoint', * ts: Date.now(), * body: { data: 'value' }, * nonce: 'random-nonce', * secretKey: 'base64-encoded-key' * }); * * Retrieve a secret key * const key = await cryptoService.getSecretKey('api-key-id', 'ciphertext-base64'); * ``` */ export declare const cryptoService: { generateDataKey(): Promise<{ ciphertext: string; secretKey: string; }>; signRequest({ method, path, ts, body, nonce, secretKey }: SignRequestParams): string; hashRequestBody(body: unknown): string; signRequestHash({ method, path, ts, bodyHash, nonce, secretKey }: SignRequestHashParams): string; getSecretKey(apiKeyId: string, ciphertextBase64: string): Promise; }; export {};