Class MongoClientEncryption

java.lang.Object
org.springframework.data.mongodb.core.encryption.MongoClientEncryption
All Implemented Interfaces:
Encryption<org.bson.BsonValue,org.bson.BsonBinary>

public class MongoClientEncryption extends Object implements Encryption<org.bson.BsonValue,org.bson.BsonBinary>
ClientEncryption based Encryption implementation.
Since:
4.1
Author:
Christoph Strobl
  • Method Details

    • just

      public static MongoClientEncryption just(com.mongodb.client.vault.ClientEncryption clientEncryption)
      Create a new MongoClientEncryption instance for the given ClientEncryption.
      Parameters:
      clientEncryption - must not be null.
      Returns:
      new instance of MongoClientEncryption.
    • decrypt

      public org.bson.BsonValue decrypt(org.bson.BsonBinary value)
      Description copied from interface: Encryption
      Decrypt the given value.
      Specified by:
      decrypt in interface Encryption<org.bson.BsonValue,org.bson.BsonBinary>
      Parameters:
      value - must not be null.
      Returns:
      the decrypted value.
    • encrypt

      public org.bson.BsonBinary encrypt(org.bson.BsonValue value, EncryptionOptions options)
      Description copied from interface: Encryption
      Encrypt the given value.
      Specified by:
      encrypt in interface Encryption<org.bson.BsonValue,org.bson.BsonBinary>
      Parameters:
      value - must not be null.
      options - must not be null.
      Returns:
      the encrypted value.
    • getClientEncryption

      public com.mongodb.client.vault.ClientEncryption getClientEncryption()