SARC: Difference between revisions
→Hash algorithm
imported>Leoetlino |
imported>Leoetlino |
||
Line 5: | Line 5: | ||
=== Hash algorithm === | === Hash algorithm === | ||
Nintendo's algorithm uses an unsigned 32-bit integer for the hash variable, and a '''''signed'' char 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++: | ||
Line 21: | Line 21: | ||
} | } | ||
</source> | </source> | ||
== Usage in ''Breath of the Wild'' == | == Usage in ''Breath of the Wild'' == |