/** Generate a random token as a hex string. */ declare function generateToken(): string; /** SHA-256 hash a string, returning hex. */ declare function hashToken(token: string): string; /** Derive an AES-256 key from a token and salt using PBKDF2. */ declare function deriveKey(token: string, salt: Buffer): Buffer; /** Encrypt plaintext using AES-256-GCM. Returns { salt, iv, authTag, ciphertext } as hex. */ declare function encrypt(plaintext: string, token: string): { salt: string; iv: string; authTag: string; ciphertext: string; }; /** Decrypt ciphertext using AES-256-GCM. */ declare function decrypt(data: { salt: string; iv: string; authTag: string; ciphertext: string; }, token: string): string; export { generateToken, hashToken, deriveKey, encrypt, decrypt };