public class MultipleProviderFactory extends Object
MasterKeyProvider
s which are backed by any number of other MasterKeyProvider
s. The returned provider will have the following properties:
MasterKeyProvider.getMasterKeysForEncryption(MasterKeyRequest)
will result in the
union of all responses from the backing providers. Likewise,
MasterKeyProvider.decryptDataKey(CryptoAlgorithm, Collection, Map)
will succeed if
and only if at least one backing provider can successfully decrypt the DataKey
s.
MasterKeyProvider.getDefaultProviderId()
is delegated to the first backing
provider.
MasterKeyProvider.getMasterKey(String, String)
will attempt to find the appropriate
backing provider to return a MasterKey
.
Modifier and Type | Method and Description |
---|---|
static <K extends MasterKey<K>> |
buildMultiProvider(Class<K> masterKeyClass,
List<? extends MasterKeyProvider<? extends K>> providers) |
static <K extends MasterKey<K>,P extends MasterKeyProvider<? extends K>> |
buildMultiProvider(Class<K> masterKeyClass,
P... providers) |
static MasterKeyProvider<?> |
buildMultiProvider(List<? extends MasterKeyProvider<?>> providers) |
static <P extends MasterKeyProvider<?>> |
buildMultiProvider(P... providers) |
public static <K extends MasterKey<K>> MasterKeyProvider<K> buildMultiProvider(Class<K> masterKeyClass, List<? extends MasterKeyProvider<? extends K>> providers)
@SafeVarargs public static <K extends MasterKey<K>,P extends MasterKeyProvider<? extends K>> MasterKeyProvider<K> buildMultiProvider(Class<K> masterKeyClass, P... providers)
public static MasterKeyProvider<?> buildMultiProvider(List<? extends MasterKeyProvider<?>> providers)
@SafeVarargs public static <P extends MasterKeyProvider<?>> MasterKeyProvider<?> buildMultiProvider(P... providers)
Copyright © 2023. All rights reserved.