Monday, October 31, 2011

Creating a Random String in Ruby

Every once in a while I want to create a totally random password that is not necessarily readable nor pronounceable. I decided to tinker around in Ruby and see what I could come up with. This isn't perfect by any means, and I'm definitely open to suggestions - I'd like to make it more accurate by specifying how many of each character types to include (I tried, but couldn't get it accurate yet). That'll be work for another night, but it was fun playing with it, and here is what I have gotten so far:

No comments:

Post a Comment