PeCryptoUtils { public static String encrypt(String value) { if (cryptoUtils == null || StringUtils.isBlank(value)) { return value; } return encryptCache.computeIfAbsent(value, cryptoUtils::encrypt); } private  PeCryptoUtils(); static synchronized void initAesKey(String theSecretKey); static String encrypt(String value); static String decrypt(String value);  }
@Test public void testEncrypt() throws GeneralSecurityException { assertEquals(pass, PeCryptoUtils.encrypt(pass)); PeCryptoUtils.initAesKey(secretKey); System.out.println("original value : " + pass + " encrypted value: " + PeCryptoUtils.encrypt(pass)); assertNotNull(PeCryptoUtils.encrypt(pass)); }