migrating md5_crypt from php to asp.net

  • Thread starter Thread starter David
  • Start date Start date
Assuming all that does is create an md5 hash for a given string:

Byte[] unencoded = Encoding.Default.GetBytes("STRING TO ENCODE");
Byte[] encoded = MD5.Create().ComputeHash(unencoded );
return BitConverter.ToString(encoded );

you'll need to import System.Text and System.Security.Cryptography

Karl
 
No Karl, the function combines the md5 hash, a salt and a magic string for
doing a lot of stuffs

thanks anyway!!

:)


Karl Seguin said:
Assuming all that does is create an md5 hash for a given string:

Byte[] unencoded = Encoding.Default.GetBytes("STRING TO ENCODE");
Byte[] encoded = MD5.Create().ComputeHash(unencoded );
return BitConverter.ToString(encoded );

you'll need to import System.Text and System.Security.Cryptography

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


David said:
Somebody know How can I migrate that function?

The source of the php function is in

http://www.oxxus.net/php-web-hosting/php5/source-md5crypt.htm

The function name is: md5_crypt


Thanks!!
 
Hello David.
I have a similar problem to your's.
Do you have already a solution ?

Thanks

Ricardo Jesus

David said:
No Karl, the function combines the md5 hash, a salt and a magic string for
doing a lot of stuffs

thanks anyway!!

:)


Karl Seguin said:
Assuming all that does is create an md5 hash for a given string:

Byte[] unencoded = Encoding.Default.GetBytes("STRING TO ENCODE");
Byte[] encoded = MD5.Create().ComputeHash(unencoded );
return BitConverter.ToString(encoded );

you'll need to import System.Text and System.Security.Cryptography

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


David said:
Somebody know How can I migrate that function?

The source of the php function is in

http://www.oxxus.net/php-web-hosting/php5/source-md5crypt.htm

The function name is: md5_crypt


Thanks!!
 
Back
Top