I'm doing a login form that uses jquery to pass data from the form to the script and back. I've noticed the email and password are being sent as plain readable text. I also noticed that in other site like this very one, or gmail or others, the login info isn't readable like mine is. How can I do this? Somehow, sending this info as plain text doesn't look very... professional.
Asked
Active
Viewed 755 times
8
-
3If not as plain text, how are they sent? What do they look like? Unless you use https (which you _should_ do for logins!!!) they will be sent in plain text. Some sites may base64 encode before sending, but that amounts to little more than obfuscation. https will protect it. – Michael Berkowski Dec 19 '12 at 03:33
-
3Use [SSL](http://en.wikipedia.org/wiki/Secure_Sockets_Layer). Set up `https:` on your server. – wallyk Dec 19 '12 at 03:33
-
That's exactly what SSL _encryption_ is for. – Sparky Dec 19 '12 at 03:34
1 Answers
6
you have several options here:
- Use HTTPS protocol to send the login informations.
You can hash/encrypt your login info on the client side, upload it/process the form, and decrypt and process the login info on your server. SO have several Q/A answers regarding this process:
However, options #2 is not really an options, if the encryption key are also submitted in plain text over the internet.
-
Option 2 shouldn't really be considered an option, since it doesn't add any security (which is mentioned in the answers you linked). – Emily Dec 19 '12 at 03:43
-
-