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.