我今天试用了 rail 的教程,对生成密码的这一部分感到困惑。
http://ruby.railstutorial.org/chapters/static-pages#top
require 'securerandom'
def secure_token
  token_file = Rails.root.join('.secret')
  if File.exist?(token_file)
    # Use the existing token.
    File.read(token_file).chomp
  else
    # Generate a new token and store it in token_file.
    token = SecureRandom.hex(64)
    File.write(token_file, token)
    token
  end
end
SampleApp::Application.config.secret_token = secure_token
谁能解释我这个文件的需要是什么。这个 64 位生成的秘密字符串的目的是什么。