1,158
edits
(→Hash algorithm: replace the code snippet with the sead implementation and add more information about the s8 cast) |
|||
Line 5: | Line 5: | ||
=== Hash algorithm === | === Hash algorithm === | ||
Nintendo's algorithm uses an unsigned 32-bit integer for the hash variable | Nintendo's algorithm uses an unsigned 32-bit integer for the hash variable. Also note that Nintendo iterates over each byte, not each string character. | ||
Here is an accurate implementation of the algorithm, written in C++: | Here is an accurate implementation of the algorithm, written in C++: |