import { BlockDataType } from '../enumerations/blockDataType'; import { BlockSize } from '../enumerations/blockSize'; import { BlockType } from '../enumerations/blockType'; import type { ChecksumService } from '../services/checksum.service'; import { Checksum } from '../types/checksum'; import { BaseBlock } from './base'; import { RawDataBlock } from './rawData'; /** * WhitenedBlock represents a block that has been XORed with random data. * In the Owner Free Filesystem (OFF), whitened blocks are used to: * 1. Obscure data by XORing with random blocks * 2. Enable data recovery through XOR operations * 3. Provide privacy without encryption overhead */ export declare class WhitenedBlock extends RawDataBlock { constructor(blockSize: BlockSize, data: Uint8Array, checksum?: Checksum, dateCreated?: Date, canRead?: boolean, canPersist?: boolean, checksumService?: ChecksumService); /** * The type of the block */ get blockType(): BlockType; /** * The type of data in the block */ get blockDataType(): BlockDataType; /** * The data in the block, excluding any metadata or other overhead */ get layerPayload(): Uint8Array; /** * Whether the block can be encrypted */ get canEncrypt(): boolean; /** * Whether the block can be decrypted */ get canDecrypt(): boolean; /** * Get the complete header data from all layers */ get fullHeaderData(): Uint8Array; /** * Convert a Readable stream to a Uint8Array * @param readable - The readable stream to convert * @returns Promise that resolves to a Uint8Array */ private static streamToUint8Array; /** * Convert data to Uint8Array regardless of whether it's a Readable or Uint8Array * @param data - The data to convert * @returns Promise that resolves to a Uint8Array */ private static toUint8Array; /** * XOR this block with another block */ xor(other: T): Promise; /** * Get this layer's header data */ get layerHeaderData(): Uint8Array; /** * Create a new whitened block by XORing data with random data */ static fromData(blockSize: BlockSize, data: Uint8Array, randomData: Uint8Array): WhitenedBlock; /** * Create a new whitened block with specified length metadata */ static from(blockSize: BlockSize, data: Uint8Array, checksum?: Checksum, dateCreated?: Date, lengthWithoutPadding?: number, canRead?: boolean, canPersist?: boolean): Promise; } //# sourceMappingURL=whitened.d.ts.map