Class: Fog::HMAC
- Inherits:
- 
      Object
      
        - Object
- Fog::HMAC
 
- Defined in:
- lib/fog/core/hmac.rb
Instance Method Summary collapse
- 
  
    
      #initialize(type, key)  ⇒ HMAC 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of HMAC. 
- #sign(data) ⇒ Object
Constructor Details
#initialize(type, key) ⇒ HMAC
| 3 4 5 6 7 8 9 10 11 | # File 'lib/fog/core/hmac.rb', line 3 def initialize(type, key) @key = key case type when "sha1" setup_sha1 when "sha256" setup_sha256 end end | 
Instance Method Details
#sign(data) ⇒ Object
| 13 14 15 | # File 'lib/fog/core/hmac.rb', line 13 def sign(data) @signer.call(data) end |