Guest User

Untitled

a guest
Jan 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. SecureRandom.hex(4)
  2. => "95bf7267"
  3.  
  4. SecureRandom.hex(4)
  5. => "95237267"
  6.  
  7. SecureRandom.random_number(a_big_number)
  8.  
  9. rand(9999)
  10.  
  11. def rand_by_length(length)
  12. rand((9.to_s * length).to_i).to_s.center(length, rand(9).to_s).to_i
  13. end
Add Comment
Please, Sign In to add comment