aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/key_generator.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-10-31 01:06:46 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2012-11-03 14:57:53 -0200
commit60609bb50d5b99d78a01a945a539cccd061cd7e7 (patch)
tree22bffef099ab1f5ef1eb7b1ac4a97c7f2b6c49ee /activesupport/lib/active_support/key_generator.rb
parentfa0aebf320995a598c5bffda729aed4429681f3a (diff)
downloadrails-60609bb50d5b99d78a01a945a539cccd061cd7e7.tar.gz
rails-60609bb50d5b99d78a01a945a539cccd061cd7e7.tar.bz2
rails-60609bb50d5b99d78a01a945a539cccd061cd7e7.zip
Sign cookies using key deriver
Diffstat (limited to 'activesupport/lib/active_support/key_generator.rb')
-rw-r--r--activesupport/lib/active_support/key_generator.rb10
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