aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/message_encryptor.rb
diff options
context:
space:
mode:
authorBenoit Tigeot <btigeot@octo.com>2017-03-14 19:09:24 +0100
committerBenoit Tigeot <btigeot@octo.com>2017-03-15 08:56:44 +0100
commit9a79201fd4645eaff99a403daa7ebc4b5d6c2c08 (patch)
treef28ab8ed2f1fae68974757a08942765f9c28029a /activesupport/lib/active_support/message_encryptor.rb
parentfb5bd3c6f2f29c3ed370e82db0d3de52a97a0648 (diff)
downloadrails-9a79201fd4645eaff99a403daa7ebc4b5d6c2c08.tar.gz
rails-9a79201fd4645eaff99a403daa7ebc4b5d6c2c08.tar.bz2
rails-9a79201fd4645eaff99a403daa7ebc4b5d6c2c08.zip
Add documentation about signature_key for MessageEncryptor.new [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/message_encryptor.rb')
-rw-r--r--activesupport/lib/active_support/message_encryptor.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/message_encryptor.rb b/activesupport/lib/active_support/message_encryptor.rb
index 0671469788..aaa12efca6 100644
--- a/activesupport/lib/active_support/message_encryptor.rb
+++ b/activesupport/lib/active_support/message_encryptor.rb
@@ -50,6 +50,11 @@ module ActiveSupport
# key by using <tt>ActiveSupport::KeyGenerator</tt> or a similar key
# derivation function.
#
+ # First additional parameter is used as the signature key for +MessageVerifier+.
+ # This allows you to specify keys to encrypt and sign data.
+ #
+ # ActiveSupport::MessageEncryptor.new('secret', 'signature_key')
+ #
# Options:
# * <tt>:cipher</tt> - Cipher to use. Can be any cipher returned by
# <tt>OpenSSL::Cipher.ciphers</tt>. Default is 'aes-256-cbc'.