Closed PiinnKs closed 3 years ago
const captchacode = crypto.randomBytes(32).toString("hex").substr(0, 4); const captcha = new CaptchaGenerator() .setCaptcha({text: captchacode, size: 60, color: '#e600ff'}) .setTrace({color: '#e600ff', size: 6}); const buffer = await captcha.generate();
You can generate captcha text by using crypto.
Docs: https://nodejs.org/dist/latest-v14.x/docs/api/crypto.html#crypto_crypto_randombytes_size_callback