How to generate a unique 8 digit number using crypto in node js? – Javascript
I want to generate a unique number everytime. I have used crypto module for that. const alphanu = crypto.randomBytes(16).toString('hex') This will generate alphanumeric string of length 32. I want to generate a number of length 8. I tried randomInt as…