/** * Utility Functions for Secure-Scan */ import { SupportedLanguage, Severity } from '../types'; /** * Generate a unique ID */ export declare function generateId(): string; /** * Calculate SHA256 hash of content */ export declare function calculateHash(content: string): string; /** * Get language from file extension */ export declare function getLanguageFromExtension(filePath: string): SupportedLanguage | null; /** * Check if file should be excluded */ export declare function shouldExclude(filePath: string, excludePatterns: string[]): boolean; /** * Get file extension for syntax highlighting */ export declare function getHighlightLanguage(language: SupportedLanguage | null): string; /** * Extract code context around a line */ export declare function extractCodeContext(content: string, lineNumber: number, contextLines?: number): { code: string; contextBefore: string; contextAfter: string; }; /** * Count lines in content */ export declare function countLines(content: string): number; /** * Severity to numeric value for comparison */ export declare function severityToNumber(severity: Severity): number; /** * Compare severities */ export declare function isHigherOrEqualSeverity(a: Severity, b: Severity): boolean; /** * Get severity color for reporting */ export declare function getSeverityColor(severity: Severity): string; /** * Get severity badge class */ export declare function getSeverityBadge(severity: Severity): string; /** * Format duration for display */ export declare function formatDuration(ms: number): string; /** * Escape HTML for safe display */ export declare function escapeHtml(text: string): string; /** * Truncate text with ellipsis */ export declare function truncate(text: string, maxLength: number): string; /** * Check if string looks like Base64 */ export declare function isBase64Like(str: string): boolean; /** * Check if string looks like hex encoded */ export declare function isHexEncoded(str: string): boolean; /** * Calculate Shannon entropy of a string * High entropy suggests encrypted/compressed/obfuscated content */ export declare function calculateEntropy(str: string): number; /** * Check if code appears obfuscated based on entropy and patterns */ export declare function looksObfuscated(code: string): boolean; //# sourceMappingURL=index.d.ts.map