1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include "../../include/std/hash.h" usize amal_hash_string(const u8 *data, usize size) { usize result; result = 0xdec05eba; while(size) { result = ((result << 5) + result) + *data; ++data; --size; } return result; }