Class: Mongo::Crypt::KMS::Local::MasterKeyDocument Private

Inherits:
Object
  • Object
show all
Defined in:
build/ruby-driver-v2.19/lib/mongo/crypt/kms/local/master_document.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Local KMS master key document object contains KMS master key parameters.

Instance Method Summary collapse

Constructor Details

#initialize(_opts) ⇒ MasterKeyDocument

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.

Creates a master key document object form a parameters hash. This empty method is to keep a uniform interface for all KMS providers.



29
30
# File 'build/ruby-driver-v2.19/lib/mongo/crypt/kms/local/master_document.rb', line 29

def initialize(_opts)
end

Instance Method Details

#to_documentBSON::Document

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.

Convert master key document object to a BSON document in libmongocrypt format.

Returns:

  • (BSON::Document)

    Local KMS credentials in libmongocrypt format.



35
36
37
# File 'build/ruby-driver-v2.19/lib/mongo/crypt/kms/local/master_document.rb', line 35

def to_document
  BSON::Document.new({ provider: "local" })
end