Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

DES Key - Client Side

Thread view: 
v8killah03@yahoo.com - 27 Nov 2005 23:40 GMT
Hi,

Can anyone please help me with the following?  I would like to be able
to generate a DES key, store it in a file, and use the key to encrypt
my message and send it to my friend's server.  I've started the
program, but am not sure where else to go with it.  Any help is greatly
appreciated.

Thanks,
James

[code]
import java.io.*;
import java.net.*;
import java.security.*;
import javax.crypto.*;

public class Cipher
{
    public static void main(String[] args) throws Exception
    {
         String message = "Hi John, here is the first message.";
         String host = "xxx.xxx.xxx";
         int port = 7999;
         Socket s = new Socket(host, port);

                   //Help here
         // DES key.
         //Storage of DES key
         // Encrypt the message using the key and send it to the
server          
    }
}
[/code]
Roedy Green - 28 Nov 2005 17:38 GMT
>Hi,
>
[quoted text clipped - 30 lines]
>}
>[/code]

See http://mindprod.com/jgloss/encryption.html

The Feghi book has lots of code examples.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.