method
unmask_token
v5.0.0.1 -
Show latest stable
- Class:
ActionController::RequestForgeryProtection
unmask_token(masked_token)protected
No documentation available.
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 341
def unmask_token(masked_token)
# 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