Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SecureRandom.hex(4)
- => "95bf7267"
- SecureRandom.hex(4)
- => "95237267"
- SecureRandom.random_number(a_big_number)
- rand(9999)
- def rand_by_length(length)
- rand((9.to_s * length).to_i).to_s.center(length, rand(9).to_s).to_i
- end
Add Comment
Please, Sign In to add comment