[Plugin]CB Hash (MD5, SHA-1 and SHA-256)

2 favourites
  • Need help! SHA1 or MD5 does not give the same value as PHP. Tried MD5B and SHA1B as well, still the same problem.

    What version of PHP are you using ?

    Are you sure you are using the exact same string in PHP and with the plugin ? ("CaSe" is not "case" is not "CASE")

  • PHP version 7.0.3.2

    Yes, I am aware of case sensitive issues.

  • How are you comparing the hashes? Indeed a comparison or just matching (visually/notepad) them?

    My point is, are you posting data to a php? Before hashing the data, var_dump it to check what exactly youre receiving.

    If youre not posting, check on /debug the data value.

  • Visually, but they are very different.

  • Visually, but they are very different.

    But do you send it trough ajax (or something liek)? Did you "var_dumped" the variable?

    For example, a space at the beggining or final of the string will generate a complete diff hash.

  • Hello Kyatric!

    Please very need version for c3 runtime :) I can't do without your plugin, as I use it for some security purposes. Therefore, I can not use all the power of c3. If you have made a paid version of its plug-in, I would be happy to buy it.

  • Hi Kyatric

    That s a cool plugin, but you think do it for C3 soon ?

  • I'm also interested by a c3 version of this good plugin ! :)

  • Thank you ! :))

  • Kyatric

    Hello Kyatric.

    I have noticed that the same error occurs with your plugin as with the photon plugin.

    I do not understand how it works.

    I can do encode and generate the string with the data but I can not do decode, so how do I convert the generated string into data for my game ?.

    I do not see any action in the plugin that says "decode ...".

    Ok, now I think I understand

    Then I must save my game data on disk

    Then I create a hash of that data and save that hash string also on disk

    Later, when I reload the game data and the hash string

    I generate a new chain with the game data loaded and I make a comparison with the chain I had saved on disk

    If the chains do not match, then that will indicate that the game data has been altered, this should mean that the player has altered the data.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Kyatric

    Can you reupload CB Hash Demo Game capx?

    CB Hash Demo Tech - Working

    CB Hash Demo Game - Dead link

    construct.net/en/tutorials/cb-hash-md5-sha-1-sha-256-59

  • Kyatric

    Can you reupload CB Hash Demo Game capx?

    CB Hash Demo Tech - Working

    CB Hash Demo Game - Dead link

    https://www.construct.net/en/tutorials/cb-hash-md5-sha-1-sha-256-59

    Links posted in the first post of the topic.

    No guarantee it will work though.

    The tech demo should be enough on its own to demonstrate the plugin.

  • Kyatric

    CBHash Demo - Game

    The game generates random strings (using a conversion from integer to ascii for each character of the string thanks to the plugin chrCast. With a little luck, Ash might implement its expressions directly in the system so the plugin shouldn't be used other than for this demo) and hashes them in several algorithms.

    The player is given a hash and he must click the matching hash on the game area (the same hash).

    On success, points are given as well as the unhashed string. Then other hashes are generated and the gameloop keeps on.

    On failure, a game over screen appears giving score, waves reached, link to the CBHash topic, and a replay option (to start playing again).

    Enjoy ^^

    Currently we can't open capx. I just edit some parts.

    Can we use for this str() expression ? It is working same or different?

    Like this => hash & str(currIntChar)

  • I don't recall exactly what the project is supposed to do, I've made it a long time ago. Apparently, it is something about converting a number (integer) to some ascii key.

    In C3 you can use an expression of the keyboard object (StringFromKeyCode) to do that conversion.

    Using the str() expression would only return a number, when the key conversion is attempting to return a specific character thanks to the provided number which acts as an "index".

Jump to:
Active Users
There are 3 visitors browsing this topic (0 users and 3 guests)