Converting C# Hashing Routines to PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey there,


I'm currently working on converting an ASP.NET, C# site/application to
PHP, and I've run into a small snag. The login algorithm hashes the
user passwords like so:

MD5 md1 = new MD5CryptoServiceProvider();
byte[] buffer1 = new ASCIIEncoding().GetBytes(stringToHash);
byte[] buffer2 = md1.ComputeHash(buffer1);
md1.Clear();
return Convert.ToBase64String(buffer2);


The challenge here is that in this conversion, I'm also migrating the
users over to a different system which uses a completely different
hashing mechanism. So, really, I need to be able to un-hash these
values, if that's even possible.

Thoughts? Options? I'm afraid this is one way hash, that I'm not going
to be able to do anything about, unfortunately.


TIA,
-Jason

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux