diff options
author | Xavier Noria <fxn@hashref.com> | 2012-01-02 14:00:32 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-01-02 14:00:32 -0800 |
commit | 7bdfbac580f7b03953f2aabf610d98c437da376e (patch) | |
tree | c130e4279ffee79d0cd6a69610480ff9eb9ca0d1 /activesupport/lib/active_support/message_encryptor.rb | |
parent | 6e9cd3846811718611543dae049c000076319587 (diff) | |
parent | 5f09414f85edfa60ab54ce8b9f8b03874e0670dc (diff) | |
download | rails-7bdfbac580f7b03953f2aabf610d98c437da376e.tar.gz rails-7bdfbac580f7b03953f2aabf610d98c437da376e.tar.bz2 rails-7bdfbac580f7b03953f2aabf610d98c437da376e.zip |
Merge pull request #4267 from lest/3-2-deprecate-activesupport-base64
deprecate ActiveSupport::Base64
Diffstat (limited to 'activesupport/lib/active_support/message_encryptor.rb')
-rw-r--r-- | activesupport/lib/active_support/message_encryptor.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/message_encryptor.rb b/activesupport/lib/active_support/message_encryptor.rb index 9ef2b29580..535eec4485 100644 --- a/activesupport/lib/active_support/message_encryptor.rb +++ b/activesupport/lib/active_support/message_encryptor.rb @@ -1,5 +1,5 @@ require 'openssl' -require 'active_support/base64' +require 'base64' module ActiveSupport # MessageEncryptor is a simple way to encrypt values which get stored somewhere @@ -73,12 +73,12 @@ module ActiveSupport encrypted_data = cipher.update(@serializer.dump(value)) encrypted_data << cipher.final - [encrypted_data, iv].map {|v| ActiveSupport::Base64.encode64s(v)}.join("--") + [encrypted_data, iv].map {|v| ::Base64.strict_encode64(v)}.join("--") end def _decrypt(encrypted_message) cipher = new_cipher - encrypted_data, iv = encrypted_message.split("--").map {|v| ActiveSupport::Base64.decode64(v)} + encrypted_data, iv = encrypted_message.split("--").map {|v| ::Base64.decode64(v)} cipher.decrypt cipher.key = @secret |