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

Inherits:
Object
  • Object
show all
Defined in:
build/ruby-driver-v2.18/lib/mongo/crypt/kms/local.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.



69
70
# File 'build/ruby-driver-v2.18/lib/mongo/crypt/kms/local.rb', line 69

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.



75
76
77
# File 'build/ruby-driver-v2.18/lib/mongo/crypt/kms/local.rb', line 75

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