Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
parthy #1
Member since Mar 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: how to convert md5 to string
Hi guys,

I know this question may not be relevant to agsxmpp but I still want to know if someone can help.

How do I convert from md5 to string in c#? I think it is not possible. I am writing a gateway using agsxmpp and I need to pass the digest to a non-xmpp server. That non-xmpp server always replies back with "invalid password". However I can also login by sending a clear-text password (although this is a huge security risk). So I want to know if I can convert somehow the digest back to string and then send it to the non-xmpp server to authenticate.

Thank you,

parthy
Avatar
Jabberer #2
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Look at the HexToString funktion in Hash.cs in agsXMPP. This is how hashes are converted to a string in XMPP.
Software Developer
AG-Software
Avatar
parthy #3
Member since Mar 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: is it possible to convert a md5 hash to original string
Thanks for the response.

But I dont think HexToString will not work for me. Based on this forum: http://www.webmasterworld.com/forum88/10659.htm , you cannot convert a md5 hash back to original string.

I need the original string of the password which I will rehash it (with a new MD5 hash) and then send it to my non-XMPP server.

Any idea how I could possibly do this?

thank you
parthy
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by parthy:
But I dont think HexToString will not work for me. Based on this forum: http://www.webmasterworld.com/forum88/10659.htm , you cannot convert a md5 hash back to original string.
You never can convert a Hash back to the original string or file. This is the idea of hashing. The server has the password and stored it in plain text or also as a Hash. If its stored as plain then the server also build the Hash and compares the Hashes. If they match then the password is correct.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS