/**
 * Memory scrubbing utilities for sensitive data.
 *
 * JavaScript strings are immutable and managed by V8's GC — they cannot be
 * reliably zeroed in-place. These utilities remove all application-level
 * references and overwrite Buffer contents, which prevents casual memory
 * dumps from revealing secrets. This is defense-in-depth, not a guarantee
 * against a sophisticated attacker with raw V8 heap access.
 */
import type { EmailMessage } from "../types/index.js";
/**
 * Wraps a secret string in a Buffer so it can be deterministically zeroed.
 * Use this for credentials that need to persist in memory during the process
 * lifetime but must be wiped on shutdown.
 */
export declare class SecureBuffer {
    private buf;
    private wiped;
    constructor(secret: string);
    /** Return the secret as a string. Throws if already wiped. */
    toString(): string;
    /** Fill the underlying buffer with zeroes. */
    wipe(): void;
    get isWiped(): boolean;
}
/** Overwrite a string property on an object with an empty string, then delete it. */
export declare function wipeString(obj: Record<string, unknown>, key: string): void;
/** Wipe multiple string keys from an object. */
export declare function wipeObject(obj: Record<string, unknown>, keys: string[]): void;
/** Scrub all entries in an email cache Map, then clear it. */
export declare function wipeEmailCache(cache: Map<string, EmailMessage>): void;
/** Scrub all entries in an email array, then return an empty array. */
export declare function wipeEmailArray(arr: EmailMessage[]): EmailMessage[];
//# sourceMappingURL=memory.d.ts.map