V
v8killah03
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
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
}
}