Hi Friends,
I have a "Packet" class with attributes like message, timestamp, key, source, destination etc. This packet basically contains the message that gets transferred along with the public/private key and the timestamp. Now I would like to encrypt this message before I send it across the socket. So can someone please tell me how to do this???
This is what i tried:
I created a Person object and populated it with message, public key, timestamp etc
Then I encrypted the Person object with a private key and got a String back.
Then, I sent the encrypted text across the socket
On receiving end, I retrieved the String and decrypted it using the public key
But now, I want to retrieve the Person object and here I fail because all the
text is not readable and I cannot use cast it back to Person class
Can someone please help me and give some pointers how to do this sort of thing....
Thanks in Advance