--- /dev/null
+// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
+// Jad home page: http://www.kpdus.com/jad.html
+// Decompiler options: packimports(3) fieldsfirst nonlb space
+
+package mcsClient;
+
+import Acme.Crypto.DesCipher;
+import java.io.IOException;
+import java.net.*;
+
+public final class SecureDatagramSocket extends DatagramSocket {
+
+ private DesCipher cipher1;
+ private DesCipher cipher2;
+ private static final boolean debug = false;
+
+ public SecureDatagramSocket(DesCipher descipher, DesCipher descipher1, int i) throws SocketException {
+ super(i);
+ cipher1 = descipher;
+ cipher2 = descipher1;
+ }
+
+ public SecureDatagramSocket(DesCipher descipher, DesCipher descipher1, int i, InetAddress inetaddress) throws SocketException {
+ super(i, inetaddress);
+ cipher1 = descipher;
+ cipher2 = descipher1;
+ }
+
+ public synchronized void receive(DatagramPacket datagrampacket) throws IOException {
+ super.receive(datagrampacket);
+ decrypt(datagrampacket.getData(), datagrampacket.getLength(), datagrampacket.getOffset());
+ }
+
+ private byte[] decrypt(byte abyte0[]) {
+ for (int i = 0; i < abyte0.length; i += 8) {
+ cipher1.decrypt(abyte0, i, abyte0, i);
+ cipher2.encrypt(abyte0, i, abyte0, i);
+ cipher1.decrypt(abyte0, i, abyte0, i);
+ }
+
+ return abyte0;
+ }
+
+ private byte[] decrypt(byte abyte0[], int i, int j) {
+ for (int k = j; k < i + j; k += 8) {
+ cipher1.decrypt(abyte0, k, abyte0, k);
+ cipher2.encrypt(abyte0, k, abyte0, k);
+ cipher1.decrypt(abyte0, k, abyte0, k);
+ }
+
+ return abyte0;
+ }
+}