OurCrypto(String keyID, String region, int cacheCapacity, int cacheMaxAgeMinutes, String accountId, RegionalClientSupplier factory) {
this.encryptionKeyProvider = KmsMasterKeyProvider
.builder()
.customRegionalClientSupplier(factory)
.defaultRegion(Region.of(region))
.buildStrict(keyID);
var decryptionKeyProvider = KmsMasterKeyProvider
.builder()
.customRegionalClientSupplier(factory)
.defaultRegion(Region.of(region))
.buildDiscovery(new DiscoveryFilter(PARTITION, List.of(accountId)));
this.manager = CachingCryptoMaterialsManager.newBuilder()
.withMasterKeyProvider(decryptionKeyProvider)
.withCache(new LocalCryptoMaterialsCache(cacheCapacity))
.withMaxAge(cacheMaxAgeMinutes, TimeUnit.MINUTES)
.build();
}
Problem:
Hello ESDK team 🙏
CachingCryptoMaterialsManagertoICryptographicMaterialsManagerandICryptographicMaterialsCache?KmsMasterKeyProvider.builder().buildStrict(keyARN)?Our existing code usage looks similar to below