migrating md5_crypt from php to asp.net

K

Karl Seguin

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
 
D

David

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!!
 
G

Guest

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!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top