import { type Logger, type ILogObj } from '../../../lib/logging/index.js';
export interface DigestChallenge {
    realm: string;
    nonce: string;
    qop?: string;
    algorithm?: string;
    opaque?: string;
    stale?: string;
    domain?: string;
}
export interface DigestResponse {
    username: string;
    realm: string;
    nonce: string;
    uri: string;
    response: string;
    qop?: string;
    nc?: string;
    cnonce?: string;
    algorithm?: string;
    opaque?: string;
}
/**
 * Handles HTTP Digest authentication according to RFC 2617
 */
export declare class DigestAuthHandler {
    private logger;
    private username;
    private password;
    private nc;
    private cnonce;
    constructor(username: string, password: string, logger: Logger<ILogObj>);
    /**
     * Parse a WWW-Authenticate or Proxy-Authenticate header
     */
    parseChallenge(authenticateHeader: string): DigestChallenge;
    /**
     * Generate a Digest authentication response
     */
    generateResponse(challenge: DigestChallenge, method: string, uri: string): string;
    /**
     * Calculate HA1 = MD5(username:realm:password)
     */
    private calculateHA1;
    /**
     * Calculate HA2 = MD5(method:uri)
     */
    private calculateHA2;
    /**
     * Generate a client nonce
     */
    private generateCnonce;
    /**
     * Format nonce count as 8-digit hex string
     */
    private formatNC;
    /**
     * Build the Authorization header string
     */
    private buildResponseHeader;
    /**
     * Reset the nonce count (useful for new sessions)
     */
    reset(): void;
    /**
     * Check if a challenge is stale
     */
    isStale(challenge: DigestChallenge): boolean;
}
//# sourceMappingURL=DigestAuthHandler.d.ts.map