Class: Mongo::Crypt::ExplicitDecryptionContext Private

Inherits:
Context
  • Object
show all
Defined in:
lib/mongo/crypt/explicit_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 explicit decryption

API:

  • private

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, doc) ⇒ ExplicitDecryptionContext

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

Parameters:

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

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

  • A document to decrypt

API:

  • private



31
32
33
34
35
36
37
# File 'lib/mongo/crypt/explicit_decryption_context.rb', line 31

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

  # Initialize the underlying mongocrypt_ctx_t object to perform
  # explicit decryption
  Binding.ctx_explicit_decrypt_init(self, doc)
end