Sha256: ec2d8ba99261f35759f2f1b28df91728d92abfd1ce4811391c31e9c5a1091b67

Contents?: true

Size: 281 Bytes

Versions: 40

Compression:

Stored size: 281 Bytes

Contents

require 'openssl'
require 'base64'

DIGEST = OpenSSL::Digest.new('sha256')

module QuickTravel
  module Encrypt
    def self.access_key(text)
      digest = OpenSSL::HMAC.hexdigest(DIGEST, QuickTravel.config.access_key, text)
      Base64.encode64s(digest).chomp
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
quicktravel_client-4.7.0 lib/quick_travel/encrypt.rb
quicktravel_client-4.6.0 lib/quick_travel/encrypt.rb
quicktravel_client-4.5.0 lib/quick_travel/encrypt.rb
quicktravel_client-4.4.0 lib/quick_travel/encrypt.rb
quicktravel_client-4.3.2 lib/quick_travel/encrypt.rb
quicktravel_client-4.3.1 lib/quick_travel/encrypt.rb
quicktravel_client-4.3.0 lib/quick_travel/encrypt.rb
quicktravel_client-4.2.0 lib/quick_travel/encrypt.rb
quicktravel_client-4.1.0 lib/quick_travel/encrypt.rb
quicktravel_client-4.0.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.9.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.8.1 lib/quick_travel/encrypt.rb
quicktravel_client-3.8.0 lib/quick_travel/encrypt.rb
quicktravel_client-1.1.2 lib/quick_travel/encrypt.rb
quicktravel_client-3.7.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.6.1 lib/quick_travel/encrypt.rb
quicktravel_client-3.6.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.5.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.4.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.3.0 lib/quick_travel/encrypt.rb