diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-10-31 01:06:46 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-11-03 14:57:53 -0200 |
commit | 60609bb50d5b99d78a01a945a539cccd061cd7e7 (patch) | |
tree | 22bffef099ab1f5ef1eb7b1ac4a97c7f2b6c49ee /activesupport/lib | |
parent | fa0aebf320995a598c5bffda729aed4429681f3a (diff) | |
download | rails-60609bb50d5b99d78a01a945a539cccd061cd7e7.tar.gz rails-60609bb50d5b99d78a01a945a539cccd061cd7e7.tar.bz2 rails-60609bb50d5b99d78a01a945a539cccd061cd7e7.zip |
Sign cookies using key deriver
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/key_generator.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/key_generator.rb b/activesupport/lib/active_support/key_generator.rb index 04d170f801..8b49ad8414 100644 --- a/activesupport/lib/active_support/key_generator.rb +++ b/activesupport/lib/active_support/key_generator.rb @@ -20,4 +20,14 @@ module ActiveSupport OpenSSL::PKCS5.pbkdf2_hmac_sha1(@secret, salt, @iterations, key_size) end end + + class DummyKeyGenerator + def initialize(secret) + @secret = secret + end + + def generate_key(salt) + @secret + end + end end |