I see this code in a web game SHA512(SeedServer + "|" + SeedUser) and I'm trying to reproduce this hash. I tried in PHP:

echo hash('SHA512',

but I can't get the same hash that is in the game.

For example I use:

seeduser  :4379f8c6822d73c6340bc9a5f9b6380fc2e90d685f5a7e5616779638a2571fa3

In the game, the result is :


How can I reproduce this result in PHP?

1 Answer 1


SHA 512 is not simply two SHA 256 hashes summed together. Ok now that that is out of the way here goes some tests. The SHA512 of the string




Which matches the result from the game.

The problem is that the PHP string appending method is . not + so this should get the answer.

echo hash('SHA512','0f13f859096d0cf5029711628c18e22792198a60eb0e561225b03a7316e813ce'.'|'.'4379f8c6822d73c6340bc9a5f9b6380fc2e90d685f5a7e5616779638a2571fa3');
  • Note. I just did a quick edit because I dropped a ' from my PHP. Now the code should work. I tested it at sandbox.onlinephpfunctions.com.
    – AstroDan
    Mar 25, 2016 at 16:19
  • 1
    If this solves your problem you can accept this answer by clicking the check box next to it.
    – AstroDan
    Mar 25, 2016 at 17:35

Not the answer you're looking for? Browse other questions tagged .