Sha256: 881c841fa1b6de8024fb71ee2f06f4a9c90f690d4b83f8f6a879894aec9af711
Contents?: true
Size: 270 Bytes
Versions: 1
Compression:
Stored size: 270 Bytes
Contents
require "pwm/version" module Pwm def self.characters (('A'..'Z').to_a + ('a'..'z').to_a + ('2'..'9').to_a) - ['I', 'l'] end def self.password(length=16) (0..length-1).inject('') do |pw, n| pw + characters[rand(characters.length)] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pwm-1.0.1 | lib/pwm.rb |