Packages

c

org.mongodb.scala.vault

ClientEncryption

case class ClientEncryption(wrapped: com.mongodb.async.client.vault.ClientEncryption) extends Closeable with Product with Serializable

The Key vault.

Used to create data encryption keys, and to explicitly encrypt and decrypt values when auto-encryption is not an option.

Annotations
@Beta()
Since

2.7

Linear Supertypes
Serializable, Product, Equals, Closeable, AutoCloseable, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClientEncryption
  2. Serializable
  3. Product
  4. Equals
  5. Closeable
  6. AutoCloseable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ClientEncryption(wrapped: com.mongodb.async.client.vault.ClientEncryption)

Value Members

  1. def close(): Unit
    Definition Classes
    ClientEncryption → Closeable → AutoCloseable
  2. def createDataKey(kmsProvider: String, dataKeyOptions: DataKeyOptions): SingleObservable[BsonBinary]

    Create a data key with the given KMS provider and options.

    Create a data key with the given KMS provider and options.

    Creates a new key document and inserts into the key vault collection.

    kmsProvider

    the KMS provider

    dataKeyOptions

    the options for data key creation

    returns

    a Publisher containing the identifier for the created data key

  3. def createDataKey(kmsProvider: String): SingleObservable[BsonBinary]

    Create a data key with the given KMS provider.

    Create a data key with the given KMS provider.

    Creates a new key document and inserts into the key vault collection.

    kmsProvider

    the KMS provider

    returns

    a Publisher containing the identifier for the created data key

  4. def decrypt(value: BsonBinary): SingleObservable[BsonValue]

    Decrypt the given value.

    Decrypt the given value.

    value

    the value to decrypt, which must be of subtype 6

    returns

    a Publisher containing the decrypted value

  5. def encrypt(value: BsonValue, options: EncryptOptions): SingleObservable[BsonBinary]

    Encrypt the given value with the given options.

    Encrypt the given value with the given options. The driver may throw an exception for prohibited BSON value types

    value

    the value to encrypt

    options

    the options for data encryption

    returns

    a Publisher containing the encrypted value, a BSON binary of subtype 6

  6. def productElementNames: Iterator[String]
    Definition Classes
    Product