Sha256: a1eb2e7f3ec9abf643736a3c87c5991b08c9265938252e399a199589cbc87ac8

Contents?: true

Size: 407 Bytes

Versions: 12

Compression:

Stored size: 407 Bytes

Contents

# frozen_string_literal: true

module Datadog
  module Core
    module Utils
      # Helper methods for encoding and decoding base64
      module Base64
        def self.encode64(bin)
          [bin].pack('m')
        end

        def self.strict_encode64(bin)
          [bin].pack('m0')
        end

        def self.strict_decode64(str)
          str.unpack1('m0')
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
datadog-2.9.0 lib/datadog/core/utils/base64.rb
datadog-2.8.0 lib/datadog/core/utils/base64.rb
datadog-2.7.1 lib/datadog/core/utils/base64.rb
datadog-2.7.0 lib/datadog/core/utils/base64.rb
datadog-2.6.0 lib/datadog/core/utils/base64.rb
datadog-2.5.0 lib/datadog/core/utils/base64.rb
datadog-2.4.0 lib/datadog/core/utils/base64.rb
datadog-2.3.0 lib/datadog/core/utils/base64.rb
datadog-2.2.0 lib/datadog/core/utils/base64.rb
datadog-2.1.0 lib/datadog/core/utils/base64.rb
datadog-2.0.0 lib/datadog/core/utils/base64.rb
datadog-2.0.0.beta2 lib/datadog/core/utils/base64.rb