Sha256: 1017fd7e2ca74caf6455d3954f5d92448a835a41402bd20a8ca24fa288d0e0a9

Contents?: true

Size: 453 Bytes

Versions: 38

Compression:

Stored size: 453 Bytes

Contents

# frozen_string_literal: true

require 'graphql/schema/base_64_bp'

module GraphQL
  class Schema
    # @api private
    module Base64Encoder
      def self.encode(unencoded_text, nonce: false)
        Base64Bp.urlsafe_encode64(unencoded_text, padding: false)
      end

      def self.decode(encoded_text, nonce: false)
        # urlsafe_decode64 is for forward compatibility
        Base64Bp.urlsafe_decode64(encoded_text)
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
graphql-1.9.21 lib/graphql/schema/base_64_encoder.rb
graphql-1.9.20 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.7 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.6 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.5 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.4 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.3 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.2 lib/graphql/schema/base_64_encoder.rb
graphql-1.9.19 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.1 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.0 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.0.pre4 lib/graphql/schema/base_64_encoder.rb
graphql-1.9.18 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.0.pre3 lib/graphql/schema/base_64_encoder.rb
graphql-1.9.17 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.0.pre2 lib/graphql/schema/base_64_encoder.rb
graphql-1.9.16 lib/graphql/schema/base_64_encoder.rb
graphql-1.9.15 lib/graphql/schema/base_64_encoder.rb
graphql-1.9.14 lib/graphql/schema/base_64_encoder.rb
graphql-1.10.0.pre1 lib/graphql/schema/base_64_encoder.rb