///
import { OracleResult } from './types';
interface NetworkStats {
count: number;
lastDownloadTime: number;
bytesDown: number;
bytesUp: number;
}
interface LogProgressOptions {
plaintext: Buffer;
ciphertext: Buffer;
foundOffsets: Set;
blockSize: number;
blockI: number;
byteI: number;
byte: number;
decryptionSuccess: boolean;
networkStats: NetworkStats;
startFromFirstBlock?: boolean;
isCacheEnabled?: boolean;
}
export declare function logProgress({ plaintext, ciphertext, foundOffsets, blockSize, blockI, byteI, byte, decryptionSuccess, networkStats, startFromFirstBlock, isCacheEnabled }: LogProgressOptions): void;
export declare function logWarning(txt: string): void;
interface LogStart {
blockCount: number;
totalSize: number;
initialRequest?: Promise;
decryptionSuccess?: Promise;
}
export declare const decryption: {
logStart({ blockCount, totalSize, initialRequest: initialRequestPromise, decryptionSuccess }: LogStart): Promise;
logCompletion({ foundBytes, interBytes }: {
foundBytes: Buffer;
interBytes: Buffer;
}): void;
};
export declare const encryption: {
logStart({ blockCount, totalSize }: LogStart): void;
logCompletion({ foundBytes, interBytes, finalRequest }: {
foundBytes: Buffer;
interBytes: Buffer;
finalRequest?: OracleResult | undefined;
}): void;
};
interface AnalysisLogCompletion {
responsesTable: string[][];
statusCodeFreq: {
[key: string]: number;
};
bodyLengthFreq: {
[key: string]: number;
};
tmpDirPath?: string;
networkStats: NetworkStats;
isCacheEnabled: boolean;
}
export declare const analysis: {
logStart({ url, blockSize, tmpDirPath }: {
url: string;
blockSize: number;
tmpDirPath?: string | undefined;
}): void;
logCompletion({ responsesTable, statusCodeFreq, bodyLengthFreq, tmpDirPath, networkStats, isCacheEnabled }: AnalysisLogCompletion): void;
};
export declare function logError(err: Error): void;
export {};