lib/generate_keys.rb
# change if you wish other character set og other random generator.
change if you wish other character set og other random generator.
change if you wish other character set og other random generator .
def generate_random_string (lng)
  chars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
  newpass = ''
  1.upto(lng) { newpass << chars[rand(chars.size-1)] }
  newpass
end
def generate_random_string ( lng ) chars = ( 'a' .. 'z' ) . to_a + ( 'A' .. 'Z' ) . to_a + ( '0' .. '9' ) . to_a newpass = '' 1 . upto ( lng ) { newpass << chars [ rand ( chars . size - 1 ) ] } newpass end
change if you wish other character set og other random generator.
change if you wish other character set og other random generator .
lng
<not_specific>