PcmHacks icon indicating copy to clipboard operation
PcmHacks copied to clipboard

Seed/Key Algo

Open jezzab opened this issue 6 years ago • 2 comments

Hi, There is nothing wrong with the 0x934D - byteswap(seed). It's because the calculator you're using (http://www.calculator.net/hex-calculator.html) is showing signed values not unsigned (showing negative values).

You should be using uint16 in your code (Unsigned 16bit Integer) and the value will roll. You can see this if you fire up Windows Calculator and do the hex calc. The result will be 0xFFFFFFFFFFFFA6D6 which in uint16 is 0xA6D6

Or use this (http://calc.penjee.com/) and set it to 16 bit and unsigned it will be correct

        static void Main(string[] args)
        {
            UInt16 seed = UInt16.Parse(args[0], System.Globalization.NumberStyles.HexNumber);
            UInt16 key = 0x934D; //Initial Value
            seed = (UInt16)((seed << 8) + (seed >> 8)); //Byteswap
            key -= seed;
            Console.WriteLine(key.ToString("X4"));
        }

Think you might find some of the keys are wrong though but works on most with your algo as its not 100% correct ;)

jezzab avatar Feb 21 '18 00:02 jezzab

Thanks! I'm reopening this issue to make sure it is taken into consideration as we work on the new app.

LegacyNsfw avatar Feb 25 '18 03:02 LegacyNsfw

I'll leave this here.... https://github.com/jezzab/GMSeedKey

jezzab avatar Dec 21 '21 00:12 jezzab