Interface Encryption<P,C>
- Type Parameters:
P
- plaintext type.C
- ciphertext type.
- All Known Implementing Classes:
MongoClientEncryption
public interface Encryption<P,C>
Component responsible for encrypting and decrypting values.
- Since:
- 4.1
- Author:
- Christoph Strobl, Ross Lawley
-
Method Summary
Modifier and TypeMethodDescriptionDecrypt the given value.encrypt
(P value, EncryptionOptions options) Encrypt the given value.default org.bson.BsonDocument
encryptExpression
(org.bson.BsonDocument value, EncryptionOptions options) Encrypt the given expression.
-
Method Details
-
encrypt
Encrypt the given value.- Parameters:
value
- must not be null.options
- must not be null.- Returns:
- the encrypted value.
-
decrypt
Decrypt the given value.- Parameters:
value
- must not be null.- Returns:
- the decrypted value.
-
encryptExpression
default org.bson.BsonDocument encryptExpression(org.bson.BsonDocument value, EncryptionOptions options) Encrypt the given expression.- Parameters:
value
- must not be null.options
- must not be null.- Returns:
- the encrypted expression.
- Since:
- 4.5.0
-