dmke/simple-password-gen

Random number seeding

afeld opened this issue · 1 comments

Do you think #srand should be called when the library is loaded to create a new random seed?

(I coincidentally was writing an alphanumeric generator today to create random passwords, and happened to come across your gem when looking at the "New Gems" on rubygems.org.)

dmke commented

Actually, rand will call srand:

This is also the behavior if Kernel::rand is called without previously calling srand, but without the sequence.

For testing purposes, it might be useful to pass a seed into the constructor. But I don't think, this will enhance the security of the generated passwords...

--Dominik