Class: Mongo::Crypt::AutoDecryptionContext Private

Inherits:
Context
  • Object
show all
Defined in:
build/ruby-driver-master/lib/mongo/crypt/auto_decryption_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 for auto decryption

Instance Attribute Summary

Attributes inherited from Context

#ctx_p

Instance Method Summary collapse

Methods inherited from Context

#run_state_machine, #state

Constructor Details

#initialize(mongocrypt, io, command) ⇒ AutoDecryptionContext

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 AutoEncryptionContext object

Parameters:

  • mongocrypt (Mongo::Crypt::Handle)

    a Handle that wraps a mongocrypt_t object used to create a new mongocrypt_ctx_t.

  • io (ClientEncryption::IO)

    A instance of the IO class that implements driver I/O methods required to run the state machine.

  • command (Hash)

    The command to be decrypted.



34
35
36
37
38
39
40
# File 'build/ruby-driver-master/lib/mongo/crypt/auto_decryption_context.rb', line 34

def initialize(mongocrypt, io, command)
  super(mongocrypt, io)

  @command = command

  Binding.ctx_decrypt_init(self, @command)
end