MCPcopy Create free account
hub / github.com/Card-Forge/forge / decrypt

Method decrypt

forge-core/src/main/java/forge/util/Base64Coder.java:383–389  ·  view source on GitHub ↗
(String value)

Source from the content-addressed store, hash-verified

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 /**

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
getInstanceMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected