/** * Constant-time comparison utilities for security-sensitive operations. * These functions prevent timing attacks by ensuring comparison time * is independent of input values. * * Uses a pure JavaScript implementation for browser compatibility. */ /** * Compare two Uint8Arrays in constant time. * This implementation XORs all bytes and accumulates differences, * ensuring the comparison time is independent of where differences occur. * * @param a First array * @param b Second array * @returns true if arrays are equal, false otherwise */ export declare function constantTimeEqual(a: Uint8Array, b: Uint8Array): boolean; /** * Compare two buffers in constant time. * This implementation XORs all bytes and accumulates differences, * ensuring the comparison time is independent of where differences occur. * * @param a First buffer * @param b Second buffer * @returns true if buffers are equal, false otherwise */ export declare function constantTimeEqualBuffer(a: Buffer, b: Buffer): boolean; /** * Compare two arrays in constant time (converts to Uint8Array) * @param a First array * @param b Second array * @returns true if arrays are equal, false otherwise */ export declare function constantTimeEqualArray(a: number[], b: number[]): boolean; //# sourceMappingURL=constantTime.d.ts.map