Module spring.data.mongodb
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 Summary
Modifier and TypeMethodDescriptionorg.bson.BsonValuedecrypt(org.bson.BsonBinary value) Decrypt the given value.org.bson.BsonBinaryencrypt(org.bson.BsonValue value, EncryptionOptions options) Encrypt the given value.com.mongodb.client.vault.ClientEncryptionstatic MongoClientEncryptionjust(com.mongodb.client.vault.ClientEncryption clientEncryption) Create a newMongoClientEncryptioninstance for the givenClientEncryption.
-
Method Details
-
just
public static MongoClientEncryption just(com.mongodb.client.vault.ClientEncryption clientEncryption) Create a newMongoClientEncryptioninstance for the givenClientEncryption.- 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:EncryptionDecrypt the given value.- Specified by:
decryptin interfaceEncryption<org.bson.BsonValue,org.bson.BsonBinary> - Parameters:
value- must not be null.- Returns:
- the decrypted value.
-
encrypt
Description copied from interface:EncryptionEncrypt the given value.- Specified by:
encryptin interfaceEncryption<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()
-