title: ASP.NET Hash password using MD5
body: <p>I've got the following code, which hashes a password as inputted by the user, and subsequently stores it in an SQL Server database:</p>
  
  <pre><code>   Byte[] originalPassword;
     Byte[] hashedPassword;
  
     MD5CryptoServiceProvider md5Hasher = new MD5CryptoServiceProvider();
     UTF8Encoding encoder = new UTF8Encoding();
  
     originalPassword = encoder.GetBytes(passwordBox.Text);
     hashedPassword = md5Hasher.ComputeHash(originalPassword);
     command.Parameters.Add(new SqlParameter("Password", hashedPassword));
     command.ExecuteNonQuery();
  </code></pre>
  
  <p><strong>My problem is that I've got a number of plaintext passwords already stored in the database. How exactly am I to modify them into this new hashed format, since they appear as '0xA99ED....'?</strong> </p>