Module: SyncwiseApi::ServiceUtils::Crypto::HmacSha256

Defined in:
lib/syncwise_api/service_utils/crypto/hmac_sha256.rb

Class Method Summary collapse

Class Method Details

.crypt(secret_key, string_to_sign) ⇒ Object



6
7
8
9
# File 'lib/syncwise_api/service_utils/crypto/hmac_sha256.rb', line 6

def crypt(secret_key, string_to_sign)
  digest = OpenSSL::Digest::Digest.new('sha256')
  OpenSSL::HMAC.digest(digest, secret_key, string_to_sign)
end