sprig icon indicating copy to clipboard operation
sprig copied to clipboard

Function with guaranteed presence of values

Open JJJJJones opened this issue 4 years ago • 0 comments

When using sprig to generate passwords there's no guarantee that the password generated conforms to standards. randAlphaNumeric() generates strings from the set of alphanumerics, not that at least one lowercase, uppercase and number are present in every string generated.

Easiest implementation would be to just check for the presence of uppercase, lowercase and numeric values in the string generated and if it doesn't have all three, reject and put out a new one (potential concern here being a degradation in the randomness of the string by repeated generation of cRNG). I'll make a PR with an idea(s).

JJJJJones avatar Feb 11 '21 22:02 JJJJJones