2010-03-23から1日間の記事一覧

random文字列

config/initializers/sessoin_store.rb の:secretとか。 # ワンライナー ruby -rsecurerandom -e 'puts SecureRandom.hex(16)' #irb require 'securerandom' SecureRandom.hex(n) #default 16 中身はこんな感じ。 /opt/local/lib/ruby/1.8/securerandom.rb d…