Generates a random uppercase hexadecimal string of specified length.
Uses cryptographically secure random bytes to generate unpredictable CAPTCHA text that is difficult for automated systems to predict or brute force.
Number of characters to generate
Random uppercase hexadecimal string
const captchaText = randomText(6); // e.g., "A3F7B2" Copy
const captchaText = randomText(6); // e.g., "A3F7B2"
const secureText = randomText(8); // e.g., "D4C9E1A7" Copy
const secureText = randomText(8); // e.g., "D4C9E1A7"
Generates a random uppercase hexadecimal string of specified length.
Uses cryptographically secure random bytes to generate unpredictable CAPTCHA text that is difficult for automated systems to predict or brute force.