Problem porting PHP crypt() function to C#
Im working on porting some old ALP user accounts to a new ASP.Net solution, and I would like for the users to be able to use their old passwords. However, in order for that to work, I need to be able to compare the old hashes to a newly calculated one, based on a newly typed password. I searched around, and found this as the implementation of crypt() called by PHP: char * crypt_md5(const char *pw, const char *salt) { MD5_CTX ctx,ctx1; unsigned long l; int sl, pl; u_int i; u_char final[MD5_SIZE]; static const char *sp, *ep; static char passwd[120], *p; static const char *magic = "$1$"; /*