Class: Covert::Hmac
- Inherits:
-
Object
- Object
- Covert::Hmac
- Defined in:
- lib/covert/hmac.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(value) ⇒ Hmac
constructor
A new instance of Hmac.
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
#call ⇒ Object
15 16 17 |
# File 'lib/covert/hmac.rb', line 15 def call OpenSSL::HMAC.hexdigest(digest, key, value) end |