Package com.mongodb.client.model.vault
Class EncryptOptions
java.lang.Object
com.mongodb.client.model.vault.EncryptOptions
The options for explicit encryption.
- Since:
- 3.11
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The QueryType to use for "Indexed" queries -
Constructor Summary
ConstructorsConstructorDescriptionEncryptOptions
(String algorithm) Construct an instance with the given algorithm. -
Method Summary
Modifier and TypeMethodDescriptioncontentionFactor
(Long contentionFactor) The contention factor.Gets the encryption algorithm, which must be either: AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic AEAD_AES_256_CBC_HMAC_SHA_512-Random Indexed UnindexedGets the contention factor.Gets the alternate name with which to look up the key.getKeyId()
Gets the key identifier.Gets the QueryType.keyAltName
(String keyAltName) Sets the alternate key namekeyId
(BsonBinary keyId) Sets the key identifierqueryType
(EncryptOptions.QueryType queryType) The QueryType.toString()
-
Constructor Details
-
EncryptOptions
Construct an instance with the given algorithm.- Parameters:
algorithm
- the encryption algorithm- See Also:
-
-
Method Details
-
getAlgorithm
Gets the encryption algorithm, which must be either:- AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic
- AEAD_AES_256_CBC_HMAC_SHA_512-Random
- Indexed
- Unindexed
- Returns:
- the encryption algorithm
-
getKeyId
Gets the key identifier.Identifies the data key by its _id value. The value is a UUID (binary subtype 4).
- Returns:
- the key identifier
-
getKeyAltName
Gets the alternate name with which to look up the key.Identifies the alternate key name to look up the key by.
- Returns:
- the alternate name
-
keyId
Sets the key identifier- Parameters:
keyId
- the key identifier- Returns:
- this
- See Also:
-
keyAltName
Sets the alternate key name- Parameters:
keyAltName
- the alternate key name- Returns:
- this
- See Also:
-
contentionFactor
The contention factor.It is an error to set contentionFactor when algorithm is not "Indexed".
- Parameters:
contentionFactor
- the contention factor, which must be>= 0
or null.- Returns:
- this
- Since:
- 4.7
-
getContentionFactor
Gets the contention factor.- Returns:
- the contention factor
- Since:
- 4.7
- See Also:
-
queryType
The QueryType.It is an error to set queryType when algorithm is not "Indexed".
- Parameters:
queryType
- the query type- Returns:
- this
- Since:
- 4.7
-
getQueryType
Gets the QueryType.- Returns:
- the queryType or null
- Since:
- 4.7
- See Also:
-
toString
-