1

in nanoid introduce page, the author told that it has a better algorithm and random % alphabet is a wrong method.

https://www.npmjs.com/package/nanoid#uniformity

i don't know is it real and why. hold there is a deduction(inference ?)

and also i had read the libray test code, when verify the distribution, count of alphabet will multiplication with a constance, why?

https://github.com/ai/nanoid/blob/master/test/non-secure.test.js#L49

hope you gay can read those english from google translation :)

Inori
  • 11
  • 2
  • See thread [here](https://github.com/ai/nanoid/issues/19), though I don't really understand it either, sounds like multiplying the random number by the range of the alphabet (which any sane attempted implementation would do) would fix the distribution problem – CertainPerformance Feb 28 '20 at 06:51

0 Answers0