Class EncryptOptions
- Since:
- 3.11
-
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 Unindexed Range TextPreviewGets the contention factor.Gets the alternate name with which to look up the key.org.bson.BsonBinary
getKeyId()
Gets the key identifier.Gets the QueryType.Gets the RangeOptionsGets the TextOptionskeyAltName
(String keyAltName) Sets the alternate key namekeyId
(org.bson.BsonBinary keyId) Sets the key identifierThe QueryType.rangeOptions
(RangeOptions rangeOptions) The RangeOptionstextOptions
(TextOptions textOptions) The TextOptionstoString()
-
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
- Range
- TextPreview
The "TextPreview" algorithm is in preview and should be used for experimental workloads only. These features are unstable and their security is not guaranteed until released as Generally Available (GA). The GA version of these features may not be backwards compatible with the preview version.
- 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" or "Range".
- Parameters:
contentionFactor
- the contention factor, which must be>= 0
or null.- Returns:
- this
- Since:
- 4.7
- Since server release
- 7.0
-
getContentionFactor
Gets the contention factor.- Returns:
- the contention factor
- Since:
- 4.7
- See Also:
- Since server release
- 7.0
-
queryType
The QueryType.Currently, we support only "equality", "range", "prefixPreview", "suffixPreview" or "substringPreview" queryType.
It is an error to set queryType when the algorithm is not "Indexed", "Range" or "TextPreview".
- Parameters:
queryType
- the query type- Returns:
- this
- Since:
- 4.7
- Since server release
- 7.0
-
getQueryType
Gets the QueryType.Currently, we support only "equality" or "range" queryType.
- Returns:
- the queryType or null
- Since:
- 4.7
- See Also:
- Since server release
- 7.0
-
rangeOptions
The RangeOptionsIt is an error to set RangeOptions when the algorithm is not "Range".
- Parameters:
rangeOptions
- the range options- Returns:
- this
- Since:
- 4.9
- MongoDB documentation
- queryable encryption
- Since server release
- 8.0
-
getRangeOptions
Gets the RangeOptions- Returns:
- the range options or null if not set
- Since:
- 4.9
- MongoDB documentation
- queryable encryption
- Since server release
- 8.0
-
textOptions
The TextOptionsIt is an error to set TextOptions when the algorithm is not "TextPreview".
- Parameters:
textOptions
- the text options- Returns:
- this
- Since:
- 5.6
- MongoDB documentation
- queryable encryption
- Since server release
- 8.2
-
getTextOptions
Gets the TextOptions- Returns:
- the text options or null if not set
- Since:
- 5.6
- See Also:
- MongoDB documentation
- queryable encryption
- Since server release
- 8.2
-
toString
-