method

mask_token

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: ActionController::RequestForgeryProtection
mask_token(raw_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 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
Register or log in to add new notes.