Module spring.data.mongodb
Interface EncryptionKeyResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface to obtain a
Data Encryption Key that is valid in a given context.
Use the based variant which will first try to resolve a potential
Key Alternate Name from annotations before calling the fallback resolver.
- Since:
- 4.1
- Author:
- Christoph Strobl
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic EncryptionKeyResolverannotated(EncryptionKeyResolver fallback) Obtain anEncryptionKeyResolverthat evaluatesExplicitEncrypted.keyAltName()and only calls the fallbackresolverif no Key Alternate Name is present.getKey(EncryptionContext encryptionContext) Get theData Encryption Key.
-
Method Details
-
getKey
Get theData Encryption Key.- Parameters:
encryptionContext- the currentcontext.- Returns:
- never null.
-
annotated
Obtain anEncryptionKeyResolverthat evaluatesExplicitEncrypted.keyAltName()and only calls the fallbackresolverif no Key Alternate Name is present.- Parameters:
fallback- must not be null.- Returns:
- new instance of
EncryptionKeyResolver.
-