net.i2p.crypto
Class CryptixAESKeyCache
java.lang.Object
net.i2p.crypto.CryptixAESKeyCache
public final class CryptixAESKeyCache
- extends Object
Cache the objects used in CryptixRijndael_Algorithm.makeKey to reduce
memory churn. The KeyCacheEntry should be held onto as long as the
data referenced in it is needed (which often is only one or two lines
of code)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CryptixAESKeyCache
public CryptixAESKeyCache()
acquireKey
public final CryptixAESKeyCache.KeyCacheEntry acquireKey()
- Get the next available structure, either from the cache or a brand new one
releaseKey
public final void releaseKey(CryptixAESKeyCache.KeyCacheEntry key)
- Put this structure back onto the available cache for reuse
createNew
public static final CryptixAESKeyCache.KeyCacheEntry createNew()