/** * XOR utility functions for CBL whitening operations. * These utilities wrap XorService and add padding/unpadding for block-aligned storage. */ /** * XOR two Uint8Arrays of equal length. * Delegates to XorService.xor for the actual XOR operation. * * @param a - First array * @param b - Second array * @returns XOR result (a ⊕ b) * @throws Error if arrays have different lengths */ export declare function xorArrays(a: Uint8Array, b: Uint8Array): Uint8Array; /** * XOR multiple Uint8Arrays of equal length together. * Delegates to XorService.xorMultiple for the actual XOR operation. * * @param arrays - Array of Uint8Arrays to XOR together (must all be same length) * @returns XOR result * @throws Error if arrays have different lengths or if no arrays provided */ export declare function xorMultipleArrays(arrays: Uint8Array[]): Uint8Array; /** * Pad data to a multiple of block size with length prefix and random bytes. * The padding ensures that the data aligns with block boundaries. * * Format: [4-byte length prefix][original data][random padding] * * @param data - The data to pad * @param blockSize - The target block size * @returns Padded data with length prefix */ export declare function padToBlockSize(data: Uint8Array, blockSize: number): Uint8Array; /** * Remove padding from CBL data by reading the length prefix. * The length prefix tells us exactly how many bytes of original data follow. * * Format: [4-byte length prefix][original data][random padding] * * @param data - The padded CBL data with length prefix * @returns Unpadded CBL data (original data without length prefix or padding) * @throws Error if data is too short or length prefix is invalid */ export declare function unpadCblData(data: Uint8Array): Uint8Array; //# sourceMappingURL=xorUtils.d.ts.map