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_verifier.rb, line 30
def initialize(secret, options = {})
unless options.is_a?(Hash)
ActiveSupport::Deprecation.warn "The second parameter should be an options hash. Use :digest => 'algorithm' to specify the digest algorithm."
options = { :digest => options }
end
@secret = secret
@digest = options[:digest] || 'SHA1'
@serializer = options[:serializer] || Marshal
end
Defined in activesupport/lib/active_support/message_verifier.rb line 30
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::MessageVerifier