import type { IncomingMessage, ServerResponse } from 'node:http';
import type { Database } from 'sql.js';
export declare function readSessionId(req: IncomingMessage): string | null;
export declare function setSessionCookie(res: ServerResponse, sessionId: string): void;
export declare function clearSessionCookie(res: ServerResponse): void;
export declare function createSession(db: Database, userId: string): string;
export declare function deleteSession(db: Database, sessionId: string): void;
export declare function getUserIdForSession(db: Database, sessionId: string): string | null;
/**
 * Hash a password using bcrypt
 */
export declare function hashPassword(password: string): Promise<string>;
/**
 * Verify a password against a hash
 */
export declare function verifyPassword(password: string, hash: string): Promise<boolean>;
/**
 * Clean up expired sessions from the database
 * @returns void
 */
export declare function cleanupExpiredSessions(db: Database): void;
