Module: GraphQL::Schema::Base64Encoder Private

Defined in:
lib/graphql/schema/base_64_encoder.rb

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.

Class Method Summary collapse

Class Method Details

.decode(encoded_text, nonce: false) ⇒ Object

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.



13
14
15
16
# File 'lib/graphql/schema/base_64_encoder.rb', line 13

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

.encode(unencoded_text, nonce: false) ⇒ Object

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.



9
10
11
# File 'lib/graphql/schema/base_64_encoder.rb', line 9

def self.encode(unencoded_text, nonce: false)
  Base64.strict_encode64(unencoded_text)
end