I'm trying to solve a puzzle: I've been given a bunch of sets of String/Key/Hash trios, and I need to figure out the hash function that generated each Hash from the given String/Key.
I'm stumped. Thoughts?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
I'm trying to solve a puzzle: I've been given a bunch of sets of String/Key/Hash trios, and I need to figure out the hash function that generated each Hash from the given String/Key.
I'm stumped. Thoughts?
Can you give an example of what it looks like when you start, what parts of that example you get, and what it should look like at the end?
NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:
When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.
Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/
Here are a couple of examples:
String: d ac2b1f3e4 ce5db ac3 71a24b
Key: 123456789abcdef
Hash: d0ac2b1f3e40ce5db0ac371a24b
String: d ac2b1f3e4 ce5db ac3 71a24b
Key: abcdef
Hash: 38116765f7a4cb1fb192
Then:
Hash: 141205a0fc9314af2fcac1c7136823f422f1bfe645bb783376 aa8926e48e41118260ceaf4a424a6b0ec7eedfbafed298ffc6 43142c80c081b23cfdb59d741a44248db96e18819034a5f46f 4b4af5
Key: 50nd4l)E16i28T3aC9L7DfcbeU(IBvtNAy
String:?
Thanks for looking
I do not think what you wish to do is trivial, and I am curious as to why you wish to do it in the first place (I ask because things typically get hashed for a reason, and the first reason that comes to mind why one would wish to backwards engineer the hash function is to hack something).
Any hacker with their head on straight is not going to straight out admit it, but there are red flags that makes one wonder what the actual intent is (such as this). For all I know the original poster has a logical reason for wishing to generate an algorithm like this, which is why I asked.