module ResponseEncryption::ActsAsEncryptionController

Public Instance Methods

add_nonce_header() click to toggle source
# File lib/response_encryption/act_as_a_encryption_controller.rb, line 19
def add_nonce_header
  response.headers['Replay-Nonce'] = context[:encoded_nonce]
end
default_context() click to toggle source

@return [ Hash ]

# File lib/response_encryption/act_as_a_encryption_controller.rb, line 10
def default_context
  @encoded_nonce ||= ResponseEncryption::SymmetricEncrypter.encoded_nonce
  {
    encoded_nonce: @encoded_nonce,
   }
end