aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-02-18 19:34:09 +0530
committerVipul A M <vipulnsward@gmail.com>2016-02-18 19:34:09 +0530
commitb286ba97d7145a585799e9d375759575e965b687 (patch)
tree761bb16c36bd9428878a4b211bdf9737d024ff37 /activesupport
parent00b62719b4ff4fe4e60b00ba46c03cc6209b1f40 (diff)
parent1caf8f6fef292a3f2961a26af94e24a86f76ef50 (diff)
downloadrails-b286ba97d7145a585799e9d375759575e965b687.tar.gz
rails-b286ba97d7145a585799e9d375759575e965b687.tar.bz2
rails-b286ba97d7145a585799e9d375759575e965b687.zip
Merge pull request #23744 from meinac/message_verifier_docs
Missing documentation about hash algorithm option for MessageVerifier
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/message_verifier.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/message_verifier.rb b/activesupport/lib/active_support/message_verifier.rb
index 854029bf83..4c3deffe6e 100644
--- a/activesupport/lib/active_support/message_verifier.rb
+++ b/activesupport/lib/active_support/message_verifier.rb
@@ -24,6 +24,12 @@ module ActiveSupport
# hash upon initialization:
#
# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', serializer: YAML)
+ #
+ # +MessageVerifier+ creates HMAC signatures using SHA1 hash algorithm by default.
+ # If you want to use a different hash algorithm, you can change it by providing
+ # `:digest` key as an option while initializing the verifier:
+ #
+ # @verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256')
class MessageVerifier
class InvalidSignature < StandardError; end