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

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

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

Loading…
Cancel
Save