pwgen icon indicating copy to clipboard operation
pwgen copied to clipboard

Fix distribution of random chars

Open ko-zu opened this issue 10 years ago • 0 comments

Use floor of [0,1) * range as an uniform dist random. The previous code may result shorter password than requested. see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random

ko-zu avatar Jan 19 '16 05:01 ko-zu