/** * Template Hasher * * Hash generation utilities for template files. * Uses SHA-256 with 16-character slice for consistency with DatabaseClient. */ /** * Template hasher - generates content hashes * * Uses the same hashing algorithm as DatabaseClient.hashContent() for consistency: * - SHA-256 hash * - Sliced to 16 characters */ export declare class TemplateHasher { /** * Hash file content using SHA256 (16 char slice for consistency) * * @param content - File content to hash * @returns 16-character hash string */ static hashContent(content: string): string; /** * Hash a file by reading its content * * @param filePath - Absolute path to the file * @returns 16-character hash string * @throws Error if file cannot be read */ static hashFile(filePath: string): Promise; /** * Hash a file by path with error handling * * @param filePath - Absolute path to the file * @returns 16-character hash string, or empty string if file doesn't exist */ static hashFileSafe(filePath: string): Promise; /** * Compare two hashes for equality * * @param hash1 - First hash * @param hash2 - Second hash * @returns true if hashes are identical */ static compare(hash1: string, hash2: string): boolean; /** * Check if a hash is valid (non-empty, 16 characters, hexadecimal) * * @param hash - Hash string to validate * @returns true if hash is valid */ static isValidHash(hash: string): boolean; /** * Hash multiple files in parallel * * @param filePaths - Array of absolute file paths * @returns Map of file path to hash */ static hashFiles(filePaths: string[]): Promise>; /** * Generate a hash from a buffer * * @param buffer - Buffer to hash * @returns 16-character hash string */ static hashBuffer(buffer: Buffer): string; } //# sourceMappingURL=hasher.d.ts.map