method

unmask_token

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: ActionController::RequestForgeryProtection
unmask_token(masked_token) private

No documentation

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

Hide source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 362
      def unmask_token(masked_token) # :doc:
        # Split the token into the one-time pad and the encrypted
        # value and decrypt it.
        one_time_pad = masked_token[0...AUTHENTICITY_TOKEN_LENGTH]
        encrypted_csrf_token = masked_token[AUTHENTICITY_TOKEN_LENGTH..-1]
        xor_byte_strings(one_time_pad, encrypted_csrf_token)
      end
Register or log in to add new notes.