md5

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kanchan
Forum Commoner
Posts: 80
Joined: Tue Nov 30, 2004 12:03 pm

md5

Post by kanchan »

<?

$a=md5('shrestha');
echo $a;

//it shows '4a315d707428056419bbb4aafd3ad620'

?>

now how to decode the final result to the first one ... i mean

4a315d707428056419bbb4aafd3ad620 to shrestha...
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

you dont.

Not possible.

Read what MD5 is for!
kanchan
Forum Commoner
Posts: 80
Joined: Tue Nov 30, 2004 12:03 pm

Post by kanchan »

please help me...can anybody help me??????
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

i just did.

It is not possible!!!! :roll:

(without a lot of processing power)
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

you want to take the md5 and return it to what it originally was!? thats like 99.99999999999999% not ever going to happen in your lifetime. Even if you were to do a brute force it would probebly take like 5 months (if the password or whatever is random enough and not just a dictionary word). Its not going to happen so start thinking about somthing else.
Sphen001
Forum Contributor
Posts: 107
Joined: Thu Mar 10, 2005 12:24 pm
Location: Land of the Beaver

Post by Sphen001 »

Hi,

Perhaps you should take a look at what md5 is meant to do. Link

md5 is one way hashing. Un-hashing it is not possible. Perhaps you should take a look at encryption instead. It will do what you want.

Hope this helps :D

Sphen001
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

YOu cannot reverse a MD5 encryption, however if you want to find out a HASHED thingy-ma-bob, then you will either need to download a MD5 Dictionary (which i'm not promoting) or turn into a hacker. (I'll slap you if you do so)
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

You could however check if something equals your md5

Code: Select all

if ($var == md5(whatever) { continue } else { stop }
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

If you want to encrypt and decrypt something, look into mcrypt()
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply