import { ProtocolVersion } from "../TLS/ProtocolVersion.js"; import { CipherDelegate, CipherSuite, DecipherDelegate, KeyMaterial } from "./CipherSuite.js"; import { PreMasterSecret } from "./PreMasterSecret.js"; import * as TypeSpecs from "./TypeSpecs.js"; export declare enum CompressionMethod { null = 0 } export declare namespace CompressionMethod { const spec: TypeSpecs.Enum; } export type ConnectionEnd = "server" | "client"; export declare class ConnectionState { entity: ConnectionEnd; cipherSuite: CipherSuite; protocolVersion: ProtocolVersion; compression_algorithm: CompressionMethod; master_secret: Buffer; client_random: Buffer; server_random: Buffer; key_material: KeyMaterial; private _cipher; get Cipher(): CipherDelegate; private _decipher; get Decipher(): DecipherDelegate; /** * Compute the master secret from a given premaster secret * @param preMasterSecret - The secret used to calculate the master secret * @param clientHelloRandom - The random data from the client hello message * @param serverHelloRandom - The random data from the server hello message */ computeMasterSecret(preMasterSecret: PreMasterSecret): void; /** * Calculates the key components */ private computeKeyMaterial; }