SARC: Difference between revisions
m
→Hash algorithm
imported>Leoetlino |
imported>Leoetlino m (→Hash algorithm) |
||
Line 10: | Line 10: | ||
<source lang="c++"> | <source lang="c++"> | ||
const uint32_t multiplier = 0x65; | |||
const char* string = "月クッパ戦Lv3(クリア後).baglshpp"; | |||
uint32_t hash = 0; | |||
int i = 0; | |||
while (true) { | |||
char c = string[i++]; // *signed* char | |||
if (!c) | |||
break; | |||
hash = hash * multiplier + c; | |||
} | |||
</source> | </source> | ||