Decode password

M

Mitesh Jain

Hi All,
i had encoded the password using,

Digest::SHA1.hexdigest("change-me--#{pass}--")

i got the password in the encoded form and i want to decode this string.

How can i do this?
 
C

chris.hulbert

Thats impossible, basically. A hash is a one-way function.
You could brute force it if you wanted, good luck waiting for
eternity...

Cheers
 
C

ChrisKaelin

Thats impossible, basically. A hash is a one-way function.
You could brute force it if you wanted, good luck waiting for
eternity...

What a luck for us unix-administrators ;-)

That's why unix-passwords are so safe since many years. Even if
someone else than root can read (/etc/shadow) you can only brute-force
that stuff and that can take some time, because even if the password
is very short, the hash always is at least 13 characters long...
 
L

Leslie Viljoen

Hi All,
i had encoded the password using,

Digest::SHA1.hexdigest("change-me--#{pass}--")

i got the password in the encoded form and i want to decode this string.

Perhaps you are trying to do authentication like this? The usual
method is to encode the password on the other side in the same way and
compare the hashes. You send the hash over the wire so that anyone
capturing the hash cannot get the password.

You may want to google and read up on Challenge Response
authentication, there are many great articles.


--=20
If you could create a machine that copies hamburgers =97 you put one
hamburger in and two equally good hamburgers come out the other side =97
it would be unethical not to do so and make it freely available.
 

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

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top