diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2012-01-03 00:55:42 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2012-01-03 00:57:03 +0300 |
commit | 5f09414f85edfa60ab54ce8b9f8b03874e0670dc (patch) | |
tree | c130e4279ffee79d0cd6a69610480ff9eb9ca0d1 /activesupport/lib/active_support/message_encryptor.rb | |
parent | 6e9cd3846811718611543dae049c000076319587 (diff) | |
download | rails-5f09414f85edfa60ab54ce8b9f8b03874e0670dc.tar.gz rails-5f09414f85edfa60ab54ce8b9f8b03874e0670dc.tar.bz2 rails-5f09414f85edfa60ab54ce8b9f8b03874e0670dc.zip |
deprecate ActiveSupport::Base64
extend and define ::Base64 if needed
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 |