method
unmask_token
v7.1.3.4 -
Show latest stable
- Class:
ActionController::RequestForgeryProtection
unmask_token(masked_token)private
No documentation available.
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 515
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