diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2015-11-11 03:46:54 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2015-11-11 03:46:54 -0200 |
commit | 2af7338bdf32790a28e388a99dada84db0af1b5f (patch) | |
tree | c2e2494eaf68d563a0cd8b48fb6a1bbb27139a58 | |
parent | 5388464af6ec229ddf3a1040cd7466f45370cedd (diff) | |
parent | 4f51433831a64605f14e14a8250fa6c166161af2 (diff) | |
download | rails-2af7338bdf32790a28e388a99dada84db0af1b5f.tar.gz rails-2af7338bdf32790a28e388a99dada84db0af1b5f.tar.bz2 rails-2af7338bdf32790a28e388a99dada84db0af1b5f.zip |
Merge pull request #22255 from reaperhulk/key-derivation
update docs for MessageEncryptor#new to recommend a KDF [ci skip]
-rw-r--r-- | activesupport/lib/active_support/message_encryptor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/message_encryptor.rb b/activesupport/lib/active_support/message_encryptor.rb index c82a13511e..2dde01c844 100644 --- a/activesupport/lib/active_support/message_encryptor.rb +++ b/activesupport/lib/active_support/message_encryptor.rb @@ -34,8 +34,8 @@ module ActiveSupport # Initialize a new MessageEncryptor. +secret+ must be at least as long as # the cipher key size. For the default 'aes-256-cbc' cipher, this is 256 # bits. If you are using a user-entered secret, you can generate a suitable - # key with <tt>OpenSSL::Digest::SHA256.new(user_secret).digest</tt> or - # similar. + # key by using <tt>ActiveSupport::KeyGenerator</tt> or a similar key + # derivation function. # # Options: # * <tt>:cipher</tt> - Cipher to use. Can be any cipher returned by |