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'; /** * RandomBlock represents a block containing cryptographically secure random data. * Used in conjunction with WhitenedBlock for the Owner Free Filesystem concept, * where data blocks are XORed with random blocks to make them meaningless on their own. */ export declare class RandomBlock extends RawDataBlock { constructor(blockSize: BlockSize, data: Uint8Array, dateCreated?: Date, checksum?: Checksum, checksumService?: ChecksumService); /** * Create a new random block */ static new(blockSize: BlockSize, dateCreated?: Date): RandomBlock; /** * Reconstitute a random block from existing data */ static reconstitute(blockSize: BlockSize, data: Uint8Array, dateCreated?: Date, checksum?: Checksum): RandomBlock; /** * The type of the block */ get blockType(): BlockType; /** * The type of data in the block */ get blockDataType(): BlockDataType; /** * Whether the block can be encrypted */ get canEncrypt(): boolean; /** * Whether the block can be decrypted */ get canDecrypt(): boolean; /** * Get this layer's header data */ get layerHeaderData(): 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; } //# sourceMappingURL=random.d.ts.map