diff --git a/KIJChat/build/built-jar.properties b/KIJChat/build/built-jar.properties index 0928796..d76c6ca 100644 --- a/KIJChat/build/built-jar.properties +++ b/KIJChat/build/built-jar.properties @@ -1,4 +1,4 @@ -#Tue, 14 Apr 2015 23:46:08 +0700 +#Wed, 15 Apr 2015 09:34:47 +0700 -E\:\\KAMPUS\\Kuliah\ ITS\\Semester\ 6\\REPO2\\simple-chat\\KIJChat= +E\:\\KAMPUS\\Kuliah\ ITS\\Semester\ 6\\REPO3\\simple-chat\\KIJChat= diff --git a/KIJChat/build/classes/kijchat/KIJChat2$IncomingReader.class b/KIJChat/build/classes/kijchat/KIJChat2$IncomingReader.class index 914f9c4..0caddcd 100644 Binary files a/KIJChat/build/classes/kijchat/KIJChat2$IncomingReader.class and b/KIJChat/build/classes/kijchat/KIJChat2$IncomingReader.class differ diff --git a/KIJChat/build/classes/kijchat/KIJChat2.class b/KIJChat/build/classes/kijchat/KIJChat2.class index cd0294c..14b7e4e 100644 Binary files a/KIJChat/build/classes/kijchat/KIJChat2.class and b/KIJChat/build/classes/kijchat/KIJChat2.class differ diff --git a/KIJChat/build/classes/kijchat/KIJChatting$3.class b/KIJChat/build/classes/kijchat/KIJChatting$3.class index 8c76171..d2b8e8e 100644 Binary files a/KIJChat/build/classes/kijchat/KIJChatting$3.class and b/KIJChat/build/classes/kijchat/KIJChatting$3.class differ diff --git a/KIJChat/build/classes/kijchat/KIJChatting.class b/KIJChat/build/classes/kijchat/KIJChatting.class index 2f5dd87..24a9924 100644 Binary files a/KIJChat/build/classes/kijchat/KIJChatting.class and b/KIJChat/build/classes/kijchat/KIJChatting.class differ diff --git a/KIJChat/src/kijchat/KIJChat2.java b/KIJChat/src/kijchat/KIJChat2.java index 26d04eb..d1c38f6 100644 --- a/KIJChat/src/kijchat/KIJChat2.java +++ b/KIJChat/src/kijchat/KIJChat2.java @@ -70,8 +70,9 @@ public void run(){ String Key=myRSA.Deskripsi_RSA(data[4], myRSA.Get_ed_RSA(myPrivateKey), myRSA.Get_N_RSA(myPrivateKey)); //myBeranda.ShowActivity("Got Message From "+data[1]+"\n"); String Plain=myRC4.Deskripsi(data[3], Key); + String Hash1=myRC4.Deskripsi(data[5], Key); String Hash=myRC4.getMD5(Plain); - if(Hash.compareTo(data[5])==0){ + if(Hash.compareTo(Hash1)==0){ myBeranda.ShowActivity("Got Message From "+data[1]+" \nMessage : "+data[3]+"\nPlain :"+Plain+"\n"); myBeranda.SendTo(data[1], Plain); } diff --git a/KIJChat/src/kijchat/KIJChatting.java b/KIJChat/src/kijchat/KIJChatting.java index 631ae56..532783d 100644 --- a/KIJChat/src/kijchat/KIJChatting.java +++ b/KIJChat/src/kijchat/KIJChatting.java @@ -26,7 +26,7 @@ public class KIJChatting extends javax.swing.JFrame { Socket sock; BufferedReader reader; PrintWriter writer; - String Recepient, Sender, Cipher, Key, e, n, PublicKey, Hash; + String Recepient, Sender, Cipher, Key, e, n, PublicKey, Hash, Hash_new; public KIJChatting(Socket sock, BufferedReader reader, PrintWriter writer, String Recepient, String Sender, Beranda Menu_Utama, String PublicKey) { this.sock=sock; this.reader=reader; @@ -152,9 +152,10 @@ private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI //ChatArea.append("3\n"); Hash=myRC41.getMD5(SendField.getText()); Cipher=myRC41.Enkripsi(SendField.getText(), DefaultKey); + Hash_new=myRC41.Enkripsi(Hash, DefaultKey); //ChatArea.append("Sender"+e+":"+n+":"+Key+":"+Cipher+":\n"); ChatArea.append("Succesfull Send Message\n"); - writer.println("SEND:"+Sender+":"+Recepient+":"+Cipher+":"+Key+":"+Hash+":"); + writer.println("SEND:"+Sender+":"+Recepient+":"+Cipher+":"+Key+":"+Hash_new+":"); writer.flush(); ChatArea.append(Sender+":"+SendField.getText()+"\n"); Menu_Utama.ShowActivity("SEND FROM ="+Sender+" TO = "+Recepient+" : "+SendField.getText()+"\n");