title: Password encryption before form submit
body: <p>
  I'm creating a website for some company I work with. It includes user authentification. The database stores the hashed passwords.
  </p>
  <p>
  At some point on a certain page, the user should be able to sign in via a popup. That requires an asynchronous request to a php file that will request the database with the password.
  </p>
  <p>
  Which leads me to my question : should I use Javascript to hash the password before it is sent in my asynchronous request, to prevent, for example, man-in-the-middle attacks or things like that ? I don't know if the site will be using HTTPS yet.
  </p>
  <p>
  Thanks.
  </p>