(String value)
| 381 | } |
| 382 | |
| 383 | public static String decrypt(String value) throws Exception { |
| 384 | SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); |
| 385 | SecretKey key = keyFactory.generateSecret(new PBEKeySpec(PASSWORD)); |
| 386 | Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); |
| 387 | pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); |
| 388 | return new String(pbeCipher.doFinal(decode(value)), StandardCharsets.UTF_8); |
| 389 | } |
| 390 | |
| 391 | // Dummy constructor. |
| 392 | /** |
nothing calls this directly
no test coverage detected