Class: ExceptionNotificationLarkNotifier::Signer

Inherits:
Object
  • Object
show all
Defined in:
lib/exception_notification-lark-notifier/signer.rb

Class Method Summary collapse

Class Method Details

.generate(timestamp, secret) ⇒ Object



3
4
5
6
# File 'lib/exception_notification-lark-notifier/signer.rb', line 3

def self.generate(timestamp, secret)
  string = "#{timestamp}\n#{secret}"
  Base64.strict_encode64(OpenSSL::HMAC.digest(OpenSSL::Digest.new("sha256"), string, ""))
end