import { inspect } from "node:util"; /** * A secret the executor holds, by name. The value lives in a `Buffer` that is * handed out only for the duration of `use`, zeroed on `dispose`, and never * produced by `toString`, `toJSON`, or `util.inspect`: an accidental * stringification yields the name, never the value. The digest is what * comparisons and rotation use, so the value itself is read as rarely as * possible. The copy a header or a client makes at the boundary is * unavoidable and is the reason the redactor exists. */ export declare class SecretHandle { readonly name: string; private value; private cachedDigest; private constructor(); /** Takes ownership of `value`; the caller must not keep a reference. */ static fromBuffer(name: string, value: Buffer): SecretHandle; static fromString(name: string, value: string): SecretHandle; get disposed(): boolean; get byteLength(): number; /** The value, for the duration of the call only. */ use(fn: (value: Buffer) => T): T; /** SHA-256 of the value, for comparison and rotation detection. */ digestBytes(): Buffer; digest(): `sha256:${string}`; /** Constant-time equality on the digests. */ equals(other: SecretHandle): boolean; /** Zeroes the value; every later `use` is refused. The digest stays available. */ dispose(): void; toString(): string; toJSON(): string; [inspect.custom](): string; } //# sourceMappingURL=SecretHandle.d.ts.map