material/program/c_cpp/library/string_hash.c
RongersLY 93cecd7544 BIG MERGE!!!
BIG ADD:
- docker
- archlinux

FIX:
- vim
- c_cpp
  - string hash
  - linux /dev/random
  - thread
  - STL
- linux
  - command
    - last

OTHERS:
- add antenna.md
- mirrors
- makefile.md
2025-04-04 17:35:35 +08:00

11 lines
241 B
C

// 非加密型hash,速度极快,支持种子
uint32_t murmur3_32(const char *key, size_t len, uint32_t seed) {
for(uint32_t i=0; i<len; i++)
{
seed ^= (const uint8_t)key[i];
seed *= 0x5bd1e995;
seed ^= seed>> 15;
}
return seed;
}