class Mongo::Crypt::RewrapManyDataKeyContext
A Context
object initialized specifically for the purpose of rewrapping data keys (decrypting and re-rencryting using a new KEK).
@api private
Public Class Methods
new(mongocrypt, io, filter, master_key_document)
click to toggle source
Create a new RewrapManyDataKeyContext
object
@param [ Mongo::Crypt::Handle
] mongocrypt a Handle
that
wraps a mongocrypt_t object used to create a new mongocrypt_ctx_t
@param [ Mongo::Crypt::EncryptionIO
] io An object that performs all
driver I/O on behalf of libmongocrypt
@param [ Hash ] filter Filter used to find keys to be updated.
alternate names for the new data key.
@param [ Mongo::Crypt::KMS::MasterKeyDocument
| nil ] master_key_document The optional master
key document that contains master encryption key parameters.
Calls superclass method
Mongo::Crypt::Context::new
# File lib/mongo/crypt/rewrap_many_data_key_context.rb, line 37 def initialize(mongocrypt, io, filter, master_key_document) super(mongocrypt, io) if master_key_document Binding.ctx_setopt_key_encryption_key(self, master_key_document.to_document) end Binding.ctx_rewrap_many_datakey_init(self, filter) end