Class EncryptionUtils

java.lang.Object
org.springframework.data.mongodb.util.encryption.EncryptionUtils

public final class EncryptionUtils extends Object
Internal utility class for dealing with encryption related matters.
Since:
3.3
Author:
Christoph Strobl
  • Constructor Details

    • EncryptionUtils

      public EncryptionUtils()
  • Method Details

    • resolveKeyId

      @Nullable public static Object resolveKeyId(String value, Supplier<org.springframework.expression.EvaluationContext> evaluationContext)
      Resolve a given plain String value into the store native keyId format, considering potential expressions.
      The potential keyId is probed against an UUID value or decoded from the base64 representation prior to conversion into its Binary format.
      Parameters:
      value - the source value to resolve the keyId for. Must not be null.
      evaluationContext - a Supplier used to provide the EvaluationContext in case an Expression is detected.
      Returns:
      can be null.
      Throws:
      IllegalArgumentException - if one of the required arguments is null.