if you are talking a bout a small program and you dont want to use SSL (see alexcohn explantion about https), then I would do the following.
Create a variable in javascript and write a key something like the following:
VAR Key="AB%&/(&/(")"
make sure to disable the mouse rightclick so people cannot read your java source code
Then you loop the password char by char and make a XOR with the key. in the way the first byte of the key is xor with the first byte with the password. Until the password is crypted.
Then in the client site use the same Key and run the same procedure.
Now you get your password back in text.
I hope it helps
Main Topics
Browse All Topics





by: alexcohnPosted on 2007-03-16 at 14:34:16ID: 18738069
You will normally use a secure communication channel, like SSL in https://, or maybe some kind of VPN, to send your password; in this case, additional encryption is not necessary, and does not make your client more secure. If you must send the password over plain http://, your mileage may vary. You can implement various crypto algorithms in you Web application, but the big question is what kind of attack you are trying to prevent. Remind you, the most secure solution will be to use https, and you may choose levels of encryption there. If all you need is avoid sending the password in plain text seen in the Ethereal by an naked eye, it's enough to encode it on send with a simple base64 encoding (see http://www.motobit.com/uti l/base64-d ecoder-enc oder.asp).