brendanashworth / generate-password

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

Added strict mode #6

Closed Algiras closed 8 years ago

Algiras commented 8 years ago

I need to generate random passwords that correlate with some guidelines.

To do so I will need to add strict property and set it to true. This way it will obey the specified rules. Hope you like it! Test it out, tell me what you think.

brendanashworth commented 8 years ago

@Algiras thanks for taking the time to put this together. There's been some discussion around this idea in https://github.com/brendanashworth/generate-password/issues/4 — are you also under the OWASP guidelines?

Algiras commented 8 years ago

What else do you need to merge the PR?

mleanos commented 8 years ago

Overall, this looks pretty good. This helps out with my requirements as well.

One thing I can nitpick at is the spacing. I think this project uses 2 tab indentation (4 spaces per tab). It makes reviewing the diffs a little more difficult with the spacing changes here.

I'm still trying to decide on how I feel about the "entropic" concerns brought up.

brendanashworth commented 8 years ago

Yes, the spacing should be fixed but that isn't particularly important — I want to nail down the algorithm first. @Algiras I really want to commend you for your work and time on this, thank you very much for sticking with me. Then it'll just be nits, I can merge it, and get a release going for you.

Also, I was wrong about the entropy, sorry about that :)

Algiras commented 8 years ago

Hope you like the regeneration approach: https://github.com/brendanashworth/generate-password/pull/7

brendanashworth commented 8 years ago

Strict mode has been added in https://github.com/brendanashworth/generate-password/commit/aa5e13edfee35852fb3a31414cbf2e8fa101e257 :) Thank you for your help!