instance method
mask_token
Ruby on Rails 7.1.6
Since v5.2.8.1 PrivateSignature
mask_token(raw_token)
No documentation comment.
Parameters
-
raw_tokenreq
Source
# 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
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 523
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection