Flowdock
method

_decrypt

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveSupport::MessageEncryptor
_decrypt(encrypted_message) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/message_encryptor.rb, line 82
    def _decrypt(encrypted_message)
      cipher = new_cipher
      encrypted_data, iv = encrypted_message.split("--").map {|v| ::Base64.decode64(v)}

      cipher.decrypt
      cipher.key = @secret
      cipher.iv  = iv

      decrypted_data = cipher.update(encrypted_data)
      decrypted_data << cipher.final

      @serializer.load(decrypted_data)
    rescue OpenSSLCipherError, TypeError
      raise InvalidMessage
    end
Register or log in to add new notes.