Ejemplo n.º 1
0
 public static void addDecrypter(Decrypter decrypter) {
   Decrypter oldDecrypter = decrypters.putIfAbsent(decrypter.getId(), decrypter);
   if (oldDecrypter != null) {
     log.warn(
         "Replace decrypter ["
             + decrypter.getId()
             + ", "
             + oldDecrypter.getClass()
             + "] with ["
             + decrypter.getClass()
             + "]");
   }
 }
 private Map<String, byte[]> decryptGamepack(final byte[] gamepack) {
   System.out.println("Decrypting gamepack.");
   try {
     final Decrypter decrypter =
         new Decrypter(gamepack, game.getParameter("-1"), game.getParameter("0"));
     decrypter.decrypt();
     System.out.println("Successfully decrypted gamepack.");
     return decrypter.getClasses();
   } catch (final Exception e) {
     System.out.println("Unable to decrypt gamepack.");
     e.printStackTrace();
   }
   return null;
 }
Ejemplo n.º 3
0
 public void up(MessageBatch batch) {
   Decrypter decrypter = new Decrypter();
   batch.map(decrypter);
   decrypter.unlock();
   if (!batch.isEmpty()) up_prot.up(batch);
 }