Module: Imagekitio::CryptoUtils Private
- Defined in:
- lib/imagekitio/helpers/crypto_utils.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Crypto utilities for ImageKit SDK Provides HMAC-SHA1 functionality for URL signing and authentication
Class Method Summary collapse
-
.create_hmac_sha1(key, data) ⇒ String
private
Creates an HMAC-SHA1 hash.
Class Method Details
.create_hmac_sha1(key, data) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates an HMAC-SHA1 hash
18 19 20 21 22 |
# File 'lib/imagekitio/helpers/crypto_utils.rb', line 18 def create_hmac_sha1(key, data) OpenSSL::HMAC.hexdigest("SHA1", key, data) rescue StandardError => e raise StandardError, "Failed to generate HMAC-SHA1 signature: #{e.}" end |