method
key_generator
v4.0.2 -
Show latest stable
- Class:
Rails::Application
key_generator()public
Return the application’s KeyGenerator
# File railties/lib/rails/application.rb, line 107
def key_generator
# number of iterations selected based on consultation with the google security
# team. Details at https://github.com/rails/rails/pull/6952#issuecomment-7661220
@caching_key_generator ||= begin
if config.secret_key_base
key_generator = ActiveSupport::KeyGenerator.new(config.secret_key_base, iterations: 1000)
ActiveSupport::CachingKeyGenerator.new(key_generator)
else
ActiveSupport::LegacyKeyGenerator.new(config.secret_token)
end
end
end Related methods
- Instance methods
- add_lib_to_load_path!
- call
- config
- env_config
- helpers_paths
- initialize!
- initialized?
- initializers
- key_generator
- reload_routes!
- require_environment!
- routes_reloader
- to_app
- watchable_args
- Class methods
- inherited
- new
- Protected methods
-
allow_concurrency? -
build_original_fullpath -
default_middleware_stack -
load_rack_cache -
ordered_railties -
railties_initializers -
reload_dependencies? -
run_console_blocks -
run_generators_blocks -
run_runner_blocks -
run_tasks_blocks -
show_exceptions_app