public Method

SecretKeyGenerator.generate_secret_with_secure_random

Generate a random secret key with Ruby 1.9’s SecureRandom module. Raises LoadError if the current Ruby version does not support SecureRandom.

Source Code

# File rails_generator/secret_key_generator.rb, line 60
def generate_secret_with_secure_random
  require 'securerandom'
  return SecureRandom.hex(64)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.