Skip to content

Correct the output of the RandomAlpha functions

Latest
Compare
Choose a tag to compare
@technosophos technosophos released this 04 Feb 20:19
f192353

This release corrects an error in the RandomAlphaNumeric(int) and CryptoRandomAlphaNumeric(int) functions. We have issued a security advisory for this change:

The functions RandomAlphaNumeric(int) and CryptoRandomAlphaNumeric(int) are not as random as they should be. Small values of int in the functions above will return a smaller subset of results than they should. For example, RandomAlphaNumeric(1) will always return a digit in the 0-9 range, while RandomAlphaNumeric(4) will return around ~7 million of the ~13M possible permutations.

See the related Security Advisory