there is a question about php code to geneate joomla pass: using php to create a joomla user password? , any ideas how to do it on a c#?
Asked
Active
Viewed 780 times
2 Answers
1
Theres some useful code here: http://www.marinovanderheijden.nl/post/2011/02/10/Validating-Joomla-15-passwords-with-C.aspx

James Hulse
- 1,566
- 15
- 32
1
Your best bet would be to port the code Joomla uses into your own libraries as static methods. All you have to do in the end would be to take the PHP process:
$salt = JUserHelper::genRandomPassword(32);
$crypt = JUserHelper::getCryptedPassword(password, $salt);
$dbPassword = $crypt.':'.$salt;
and convert it to C#:
string salt = Libraries.JUserHelper.genRandomPassword(32);
string crypt = Libraries.JUserHelper.getCryptedPassword(password, salt);
string dbPassword = string.Format("{0}:{1}", crypt, salt);

Matt Bishop
- 1,010
- 7
- 18