1 // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
2 // Jad home page: http://www.kpdus.com/jad.html
3 // Decompiler options: packimports(3) fieldsfirst nonlb space
7 import Acme.Crypto.DesCipher;
8 import java.io.IOException;
11 public final class SecureDatagramSocket extends DatagramSocket {
13 private DesCipher cipher1;
14 private DesCipher cipher2;
15 private static final boolean debug = false;
17 public SecureDatagramSocket(DesCipher descipher, DesCipher descipher1, int i) throws SocketException {
23 public SecureDatagramSocket(DesCipher descipher, DesCipher descipher1, int i, InetAddress inetaddress) throws SocketException {
24 super(i, inetaddress);
29 public synchronized void receive(DatagramPacket datagrampacket) throws IOException {
30 super.receive(datagrampacket);
31 decrypt(datagrampacket.getData(), datagrampacket.getLength(), datagrampacket.getOffset());
34 private byte[] decrypt(byte abyte0[]) {
35 for (int i = 0; i < abyte0.length; i += 8) {
36 cipher1.decrypt(abyte0, i, abyte0, i);
37 cipher2.encrypt(abyte0, i, abyte0, i);
38 cipher1.decrypt(abyte0, i, abyte0, i);
44 private byte[] decrypt(byte abyte0[], int i, int j) {
45 for (int k = j; k < i + j; k += 8) {
46 cipher1.decrypt(abyte0, k, abyte0, k);
47 cipher2.encrypt(abyte0, k, abyte0, k);
48 cipher1.decrypt(abyte0, k, abyte0, k);