Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Orochi Engine String Hash

Featured Replies

  • Author
  • Localization

chrrox, posted Tue Mar 31, 2020 1:54 am (55395)


How would you convert this hash function to quickbms.

Code:
#include 
#include

__int64_t hashMagic(__int64_t a1, unsigned int a2)
{
  unsigned int i;
  unsigned int v4;

  v4 = 37;
  for ( i = 0; i < a2; i )
    v4 = *(char *)(a1 i) 37 * v4;
   
  return v4;
}

int main()
{
    std::string str ("GAME/SKILL/25310/model/TEXTURE/001/Tex_c");
    __int64_t v1 = (__int64_t)"GAME/SKILL/25310/model/TEXTURE/001/Tex_c";
    int v2 = str.length();
    __int64_t v3 = hashMagic(v1, v2);
    printf("\nHash:""%X",(int) v3);
}



it should output

Hash:75963DE9
  • Author
  • Localization

aluigi, posted Tue Mar 31, 2020 8:46 am (55400)


Code:
set VAR string "GAME/SKILL/25310/model/TEXTURE/001/Tex_c"
callfunction hashMagic 1
print "%v4|x%"

startfunction hashMagic
    strlen VARSZ VAR
    math v4 = 37
    for x = 0 < VARSZ
        getvarchr TMP VAR x
        xmath v4 "TMP 37 * v4"
    next x
endfunction

If you prefer to pass VAR as argument of hashMagic, just rename VAR as hashMagic_ARG1 in the function and call it as "callfunction hashMagic 1 VAR"
  • Author
  • Localization

chrrox, posted Tue Mar 31, 2020 1:24 pm (55414)


that worked perfect Thanks :)
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.