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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectresolveKeyId(String value, Supplier<EvaluationContext> evaluationContext) Resolve a given plainStringvalue 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 plainStringvalue into the store native keyId format, considering potentialexpressions.
The potential keyId is probed against anUUID valueor decoded from the base64 representation prior to conversion into itsBinaryformat.- Parameters:
value- the source value to resolve the keyId for. Must not be null.evaluationContext- aSupplierused to provide theEvaluationContextin case anExpressionisdetected.- Returns:
- can be null.
- Throws:
IllegalArgumentException- if one of the required arguments is null.
-