Class EncryptionUtils
java.lang.Object
org.springframework.data.mongodb.util.encryption.EncryptionUtils
Internal utility class for dealing with encryption related matters.
- Since:
- 3.3
- Author:
- Christoph Strobl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
resolveKeyId
(String value, Supplier<EvaluationContext> evaluationContext) Resolve a given plainString
value into the store native keyId format, considering potentialexpressions
.
-
Constructor Details
-
EncryptionUtils
public EncryptionUtils()
-
-
Method Details
-
resolveKeyId
@Nullable public static Object resolveKeyId(String value, Supplier<EvaluationContext> evaluationContext) Resolve a given plainString
value into the store native keyId format, considering potentialexpressions
.
The potential keyId is probed against anUUID value
or decoded from the base64 representation prior to conversion into itsBinary
format.- Parameters:
value
- the source value to resolve the keyId for. Must not be null.evaluationContext
- aSupplier
used to provide theEvaluationContext
in case anExpression
isdetected
.- Returns:
- can be null.
- Throws:
IllegalArgumentException
- if one of the required arguments is null.
-