/**
 * src/utils/crypto.ts
 * أدوات التشفير — Encryption utilities for tenant data security
 * Uses Node.js built-in crypto module — AES-256-GCM + SHA-256
 */
/**
 * تشفير النص — Encrypt text using AES-256-GCM
 *
 * Output format: iv:authTag:ciphertext (all base64)
 *
 * @param text - Plain text to encrypt
 * @param key - Encryption key (32 bytes hex or raw string that gets derived)
 * @returns Encrypted string in format iv:tag:ciphertext
 */
export declare function encrypt(text: string, key: string): string;
/**
 * فك التشفير — Decrypt AES-256-GCM encrypted text
 *
 * @param ciphertext - Encrypted string in format iv:tag:ciphertext
 * @param key - Same key used for encryption
 * @returns Decrypted plain text
 * @throws Error if decryption fails (wrong key or tampered data)
 */
export declare function decrypt(ciphertext: string, key: string): string;
/**
 * هاش رقم الهاتف — SHA-256 hash for phone number indexing
 * Normalizes phone number before hashing for consistency
 *
 * @param phone - Phone number (any format)
 * @returns Hex-encoded SHA-256 hash
 */
export declare function hashPhone(phone: string): string;
/**
 * توليد مفتاح مستأجر — Generate a cryptographically secure per-tenant key
 * Returns a 64-character hex string (256 bits of entropy)
 */
export declare function generateTenantKey(): string;
/**
 * Constant-time string comparison to prevent timing attacks
 */
export declare function secureCompare(a: string, b: string): boolean;
//# sourceMappingURL=crypto.d.ts.map