Page 1 of 1

Hash Function

Posted: November 27th, 2018, 12:23 pm
by qooowinnerooop
is there any way to decode a hash function to know a hidden activator like this?

Code: Select all

if StringHash(SubString(GetEventPlayerChatString(),0,'d'))==-$50A9C479


in order to hide my activator i would like to know how to make a stringhash like this, can anyone show me the way to make it and decode it? Thanks a lots

Re: Hash Function

Posted: November 27th, 2018, 1:22 pm
by clanhinata
qooowinnerooop wrote:is there any way to decode a hash function to know a hidden activator like this?

Yes
qooowinnerooop wrote:in order to hide my activator i would like to know how to make a stringhash like this, can anyone show me the way to make it and decode it? Thanks a lots

Code: Select all

Native StringHash takes string whichString returns integer

Re: Hash Function

Posted: November 28th, 2018, 1:23 am
by nuzamacuxe
There's no way to decode StringHash.

Re: Hash Function

Posted: November 29th, 2018, 11:29 am
by devoltz
nuzamacuxe wrote:There's no way to decode StringHash.
I dont doubt hinata's autism, so he probably can decode stringhash.

Re: Hash Function

Posted: November 30th, 2018, 8:07 pm
by null
Decoding StringHash is possible, but its almost near to impossible to find out the original cheat code from the hash value.

Think of a cheat code you want to use. For example, you want to use "cheat" as the cheat code. Create a test map where you print the hash value of cheat:

Code: Select all

call BJDebugMsg(StringHash("cheat"))


Then you know the hash value and you can use that information in the original map. Let's assume the hash value is 1234. Input;

Code: Select all

if StringHash(GetEventPlayerChatString())==1234 then

...
endif

In your code, you basically use this condition:

Code: Select all

StringHash(GetEventPlayerChatString()) ==  StringHash("cheat")


But replace the StringHash("cheat") with the calculated value, so you don't actually have to put the cheat code into the map script. As I said it is pretty much impossible to find out the original cheat code from the hash value. Not impossible, but still impossible in a way.

Re: Hash Function

Posted: November 30th, 2018, 9:16 pm
by devoltz
Hinata autism + Null autism = we can decode stringhash.