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.BsonValue
decrypt
(org.bson.BsonBinary value) Decrypt the given value.org.bson.BsonBinary
encrypt
(org.bson.BsonValue value, EncryptionOptions options) Encrypt the given value.com.mongodb.client.vault.ClientEncryption
static MongoClientEncryption
just
(com.mongodb.client.vault.ClientEncryption clientEncryption) Create a newMongoClientEncryption
instance for the givenClientEncryption
.
-
Method Details
-
just
public static MongoClientEncryption just(com.mongodb.client.vault.ClientEncryption clientEncryption) Create a newMongoClientEncryption
instance 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:Encryption
Decrypt the given value.- Specified by:
decrypt
in interfaceEncryption<org.bson.BsonValue,
org.bson.BsonBinary> - Parameters:
value
- must not be null.- Returns:
- the decrypted value.
-
encrypt
Description copied from interface:Encryption
Encrypt the given value.- Specified by:
encrypt
in 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()
-