tildaslash/RatticWeb — pull request #245 by amcinnes (2014-04-09 04:03:39+00:00)
Title: Password generator: Make shuffling unbiased

The shuffling algorithm did not give all permutations with equal probability. For example, if you called

_makePassword(3,['spaces'],['numbers','lcasealpha']);

then the space character would be significantly more likely to be the second character than the first character.

I think this fixes it. See http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm .