优化 非对称加密 60%(未完)

v1.4.1
hiparker 4 years ago
parent f4e2a59e71
commit 04dae4dbf9

@ -57,21 +57,13 @@ public class CryptoAsymmetricAsymmetricImpl implements CryptoAsymmetricService {
static{
// 初始化缓存类对象
LFU_CACHE_MAP = Maps.newConcurrentMap();
LFU_CACHE_MAP.put(CryptoAsymmetricType.RSA,
CacheBuilder
.newBuilder().maximumSize(DEFAULT_CACHE_COUNT)
.expireAfterWrite(DEFAULT_CACHE_TIME, TimeUnit.MINUTES).build()
);
LFU_CACHE_MAP.put(CryptoAsymmetricType.SM2,
CacheBuilder
.newBuilder().maximumSize(DEFAULT_CACHE_COUNT)
.expireAfterWrite(DEFAULT_CACHE_TIME, TimeUnit.MINUTES).build()
);
LFU_CACHE_MAP.put(CryptoAsymmetricType.ECIES,
CacheBuilder
.newBuilder().maximumSize(DEFAULT_CACHE_COUNT)
.expireAfterWrite(DEFAULT_CACHE_TIME, TimeUnit.MINUTES).build()
);
for (CryptoAsymmetricType asymmetricType : CryptoAsymmetricType.values()) {
LFU_CACHE_MAP.put(asymmetricType,
CacheBuilder
.newBuilder().maximumSize(DEFAULT_CACHE_COUNT)
.expireAfterWrite(DEFAULT_CACHE_TIME, TimeUnit.MINUTES).build()
);
}
}
/**

Loading…
Cancel
Save