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(ciphertext, 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(ciphertext, nonce: false)
  # urlsafe_decode64 is for forward compatibility
  Base64Bp.urlsafe_decode64(ciphertext)
end

.encode(plaintext, 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(plaintext, nonce: false)
  Base64.strict_encode64(plaintext)
end