shanesveller (owner)

Revisions

gist: 32502 Download_button fork
public
Description:
Generates a 32-length random key of /[0-9A-F]/ characters
Public Clone URL: git://gist.github.com/32502.git
Embed All Files: show embed
access-key.rb #
1
2
3
4
5
Array.new(16) { rand(256) }.pack('C*').unpack('H*').first
# => b3512f4972d314da94380e1a70e6814a
 
# Courtesy of http://norbauer.com/notes/generating-access-keys
# via rubyjudo.com