class method
self.new
Ruby on Rails 3.2.22.5
Since v2.3.18Signature
self.new(secret, options = {})
No documentation comment.
Parameters
-
secretreq -
optionsopt = {}
Source
# File activesupport/lib/active_support/message_encryptor.rb, line 26
def initialize(secret, options = {})
unless options.is_a?(Hash)
ActiveSupport::Deprecation.warn "The second parameter should be an options hash. Use :cipher => 'algorithm' to specify the cipher algorithm."
options = { :cipher => options }
end
@secret = secret
@cipher = options[:cipher] || 'aes-256-cbc'
@verifier = MessageVerifier.new(@secret, :serializer => NullSerializer)
@serializer = options[:serializer] || Marshal
end
Defined in activesupport/lib/active_support/message_encryptor.rb line 26
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::MessageEncryptor