I'm trying to create new passwords to Joomla 2.5 using C#.
I've tried the method where I hash some pass with MD5CryptoService
and then concat a salt string with 32 characters, but without success.
var provider = new MD5CryptoServiceProvider();
var bytesFromPassword = System.Text.Encoding.ASCII.GetBytes("my_password");
var hash = provider.ComputeHash(bytesFromPassword);
Random random = new Random((int) DateTime.Now.Ticks);
byte[] salt = new byte[32];
random.NextBytes(salt);
string hashTo64 = Convert.ToBase64String(hash);
string saltTo64 = Convert.ToBase64String(salt);
var formattedPassword = string.Format("{0}:{1}", hashTo64, saltTo64);
Is something wrong with this code?
Do I need to change something?
Does Joomla 2.5 uses a new cryptography method that is different than this way I'm trying to do?
Thank you all!