title: Where do I hash the password?
body: <p>I'm using MVC and I want to know at which point do I hash the user password:</p>
  
  <ol>
  <li>before sending to the server (view)</li>
  <li>in the server, when I set the object field (model)</li>
  <li>in the server, when I send the object to the controller (controller)</li>
  <li>in the server, when I prepare the statements (controller)</li>
  <li>in the database, </li>
  </ol>
  
  <p>e.g. using <code>"set password = sha256(:password)"</code> in the statement</p>
  
  <p>I'm kind of confused, I've been always hashing the password when I create the object and set the field "password" but I've read somewhere it's not safe enough. I'm not sure.</p>