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-3.2.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.1.0 lib/quick_travel/encrypt.rb
quicktravel_client-3.0.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.9.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.8.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.7.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.6.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.5.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.4.1 lib/quick_travel/encrypt.rb
quicktravel_client-2.4.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.3.1 lib/quick_travel/encrypt.rb
quicktravel_client-2.3.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.2.2 lib/quick_travel/encrypt.rb
quicktravel_client-2.2.1 lib/quick_travel/encrypt.rb
quicktravel_client-2.2.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.1.0 lib/quick_travel/encrypt.rb
quicktravel_client-2.0.0 lib/quick_travel/encrypt.rb
quicktravel_client-1.1.1 lib/quick_travel/encrypt.rb
quicktravel_client-1.1.0 lib/quick_travel/encrypt.rb
quicktravel_client-1.0.2 lib/quick_travel/encrypt.rb