byte[] b = System.Text.Encoding.ASCII.GetBytes(oleDR["password"].ToString()); string hashpassword = Convert.ToBase64String(((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(b));