Is this a good way to encrypt passwords with MD5?
I have never encrypted a password before, and this is what I came up with to do it, with the aid of this article . The article didn't include salt, so I had to figure it out myself: UTF8Encoding encoder = new UTF8Encoding(); byte[] salt = new byte[8]; new Random().NextBytes(salt); byte[] encodedPassword = encoder.GetBytes(txtPassword.Text); byte[] saltedPassword = new byte[8 + encodedPassword.Length]; System.Buffer.BlockCopy(salt, 0, saltedPassword, 0, 8); System.Buffer.BlockCopy(encodedPassword, 0, saltedPassword, 8, encodedPassword.Length); byte[] encryptedPassword = new