Module: Castle::SecureMode

Defined in:
lib/castle/secure_mode.rb

Class Method Summary collapse

Class Method Details

.signature(user_id, config = nil) ⇒ Object

Parameters:



10
11
12
13
# File 'lib/castle/secure_mode.rb', line 10

def signature(user_id, config = nil)
  config ||= Castle.config
  OpenSSL::HMAC.hexdigest('sha256', config.api_secret, user_id.to_s)
end