Method: Warren::MessageFilter::SharedSecret.secret

Defined in:
lib/warren/filters/shared_secret.rb

.secret(msg) ⇒ Object

Returns the hashed message

Expects that msg#to_s returns a string to hash against.



44
45
46
# File 'lib/warren/filters/shared_secret.rb', line 44

def self.secret msg
  HMAC::SHA256.hexdigest(self.key, msg.to_s)
end