For a while i started with network programming. So far i created networking part for my game and a simple game server. To play the game, players have to log in with their username and password. So far, the login procedure is simple, player sends their user name and password as simple strings. Passwords on the server are also stored as simple text files. When player attempts to log in, server reads the password from file and compares it with the received password.
At this point we really can't talk about security, so here is what i wanted to ask. I have read that passwords are usually stored in a salted hash form. The salt is also stored. When the server receives password from player it tries to hash it again and then compares it with stored hash.
Now to the question: How do i send the password over the LAN / internet? Sending plain text isn't secure. What are the usual methods to send passwords? What are the usual methods to log in to games that require user name, password?