brendanashworth / generate-password

NodeJS library for generating cryptographically-secure passwords.
MIT License
354 stars 67 forks source link

Lowercase and Uppercase are not consistently there. #42

Closed tpiqweb closed 4 years ago

tpiqweb commented 4 years ago

I'm pretty sure I have this set up correctly. But I do not get consistent/expected results. Not all passwords have both upper and lower case letters. Am I doing something wrong?

` const Password = require('generate-password');

for (let i = 0; i < 20; i++) { const password = Password.generate({ length: 10, numbers: true, symbols: true, lowercase: true, uppercase: true });

console.log(password); } `

brendanashworth commented 4 years ago

Hi @tpiqweb , you should take a look at the strict: true flag, that will always include a lowercase and uppercase letter in passwords. This is not on by default. More info here: https://github.com/brendanashworth/generate-password/issues/19#issuecomment-328235015