Class LocalCryptoMaterialsCache

  • All Implemented Interfaces:
    CryptoMaterialsCache

    public class LocalCryptoMaterialsCache
    extends Object
    implements CryptoMaterialsCache
    A simple implementation of the CryptoMaterialsCache using a basic LRU cache. Example usage: LocalCryptoMaterialsCache cache = new LocalCryptoMaterialsCache(500); CachingCryptoMaterialsManager materialsManager = CachingCryptoMaterialsManager.builder() .setMaxAge(5, TimeUnit.MINUTES) .setCache(cache) .withMasterKeyProvider(myMasterKeyProvider) .build(); byte[] data = new AwsCrypto().encryptData(materialsManager, plaintext).getResult();
    • Constructor Detail

      • LocalCryptoMaterialsCache

        public LocalCryptoMaterialsCache​(int capacity)