import { EncryptionConfig, RequestInterceptorConfig } from "../types"; interface IncomingMessage { url?: string; headers: { [key: string]: string | string[] | undefined; }; on(event: string, callback: (data: any) => void): void; body?: any; } interface ServerResponse { statusCode: number; setHeader(name: string, value: string): void; write(chunk: any): boolean; end(chunk?: any): void; send?: (data: any) => void; json?: (data: any) => void; } export declare class ServerRequestEncryption { private encryption; private autoEncrypt; private autoDecrypt; private rsaPrivateKey?; constructor(config: EncryptionConfig); decryptRSA(encryptedString: string): Promise; decryptHybrid(encryptedString: string): Promise; /** * Express middleware that automatically: * - Decrypts incoming requests if they're encrypted * - Encrypts outgoing responses automatically */ expressMiddleware(config?: RequestInterceptorConfig): (req: any, res: any, next: any) => void; /** * Automatically decrypt incoming request */ private decryptIncomingRequest; /** * Automatically encrypt outgoing response */ private encryptOutgoingResponse; /** * Fastify plugin for automatic encryption/decryption */ fastifyPlugin(config?: RequestInterceptorConfig): (fastify: any, opts: any, done: Function) => void; private decryptFastifyRequest; private encryptFastifyResponse; /** * Native Node.js HTTP middleware */ httpMiddleware(config?: RequestInterceptorConfig): (req: IncomingMessage, res: ServerResponse, next: () => void) => void; private shouldProcessRequest; encryptData(data: any): string; decryptData(encryptedString: string): any; isEncrypted(data: string): boolean; static generateKey(length?: number): string; } export {}; //# sourceMappingURL=node.d.ts.map