Class: Covert::Hmac

Inherits:
Object
  • Object
show all
Defined in:
lib/covert/hmac.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Hmac

Returns a new instance of Hmac.



11
12
13
# File 'lib/covert/hmac.rb', line 11

def initialize(value)
  @value = value
end

Class Method Details

.call(value:) ⇒ Object



6
7
8
# File 'lib/covert/hmac.rb', line 6

def call(value:)
  new(value).call
end

Instance Method Details

#callObject



15
16
17
# File 'lib/covert/hmac.rb', line 15

def call
  OpenSSL::HMAC.hexdigest(digest, key, value)
end