How to generate random string using SecureRandom in Ruby

1 Answer

0 votes
require 'securerandom'

s = SecureRandom.hex

puts s



# run:
# 
# 8af4cb73cfb8361fc27f12342695bd06
#

 



answered Dec 23, 2020 by avibootz
...