Created
March 17, 2010 11:27
-
-
Save aderyabin/335138 to your computer and use it in GitHub Desktop.
generate random sequence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generate random sequence | |
#SecureRandom also has methods for: base64, hex, bytes, random_number | |
#see: http://api.rubyonrails.org/classes/ActiveSupport/SecureRandom.html | |
require 'active_support/secure_random' | |
ActiveSupport::SecureRandom.hex(16) | |
# outputs: 6dc19d21e958e04645cddadb96e9c927 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment