title: MVC 3 where to encrypt the user's password?
body: <p>I have my own password encryption dll that I am using to check the user's password when they login, this is referenced in my User entity.</p>
  
  <p>Now I have created the ability for a user to register which is working fine, apart from the passwords are yet to be encrypted.</p>
  
  <p>My question is quite simple, where should I put the encryption of the new user's password? I'm not sure as I am aware that the user's password shouldn't be transmitted in plain text, therefore I don't know where the best place to call the encryption function:</p>
  
  <ul>
  <li>User Entity (where the encryption dll is already used for validation).</li>
  <li>The User repository where the save user method is.</li>
  <li>The User controller where the user creation views are controlled.</li>
  <li>Somewhere else that I haven't considered!</li>
  </ul>
  
  <p>Thanks very much</p>