method
mask_token
rails latest stable - Class:
ActionController::RequestForgeryProtection
mask_token(raw_token)private
No documentation available.
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 523
def mask_token(raw_token) # :doc:
one_time_pad = SecureRandom.random_bytes(AUTHENTICITY_TOKEN_LENGTH)
encrypted_csrf_token = xor_byte_strings(one_time_pad, raw_token)
masked_token = one_time_pad + encrypted_csrf_token
encode_csrf_token(masked_token)
end