supa-seed
Version:
A constraint-aware, framework-agnostic database seeding framework with deep PostgreSQL business logic discovery and MakerKit integration support
51 lines • 1.56 kB
TypeScript
/**
* Crypto Utilities for MFA and Security Testing
* Provides TOTP generation, backup codes, and crypto functions for testing
* Part of Task 1.2: Add MFA Factor Support
*/
/**
* Generate a secure TOTP secret
*/
export declare function generateTOTPSecret(length?: number): string;
/**
* Generate TOTP code for testing
* This is a simplified implementation for testing purposes
*/
export declare function generateTOTPCode(secret: string, timestamp: number): string;
/**
* Generate backup codes for MFA recovery
*/
export declare function generateBackupCodes(count?: number): string[];
/**
* Validate TOTP code format
*/
export declare function isValidTOTPCode(code: string): boolean;
/**
* Validate backup code format
*/
export declare function isValidBackupCode(code: string): boolean;
/**
* Generate secure random string
*/
export declare function generateSecureString(length: number): string;
/**
* Hash password for testing (simple implementation)
*/
export declare function hashPassword(password: string): string;
/**
* Generate realistic phone number for testing
*/
export declare function generateTestPhoneNumber(countryCode?: string): string;
/**
* Generate JWT-like token for testing
*/
export declare function generateTestJWT(payload: Record<string, any>): string;
/**
* Generate challenge ID for MFA testing
*/
export declare function generateChallengeId(): string;
/**
* Generate factor ID for MFA testing
*/
export declare function generateFactorId(type: 'totp' | 'phone'): string;
//# sourceMappingURL=crypto-utils.d.ts.map