Class: Mongo::Crypt::DataKeyContext Private
- Defined in:
- lib/mongo/crypt/data_key_context.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.
A Context object initialized specifically for the purpose of creating a data key in the key management system.
Instance Attribute Summary
Attributes inherited from Context
Instance Method Summary collapse
-
#initialize(mongocrypt, io, master_key_document, key_alt_names, key_material) ⇒ DataKeyContext
constructor
private
Create a new DataKeyContext object.
Methods inherited from Context
Constructor Details
#initialize(mongocrypt, io, master_key_document, key_alt_names, key_material) ⇒ DataKeyContext
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.
Create a new DataKeyContext object
41 42 43 44 45 46 47 |
# File 'lib/mongo/crypt/data_key_context.rb', line 41 def initialize(mongocrypt, io, master_key_document, key_alt_names, key_material) super(mongocrypt, io) Binding.ctx_setopt_key_encryption_key(self, master_key_document.to_document) set_key_alt_names(key_alt_names) if key_alt_names Binding.ctx_setopt_key_material(self, BSON::Binary.new(key_material)) if key_material initialize_ctx end |