MySQL 9.1.0
Source Code Documentation
my_murmur3.h File Reference
#include <stddef.h>
#include "my_inttypes.h"
#include "my_macros.h"

Go to the source code of this file.

Functions

uint32 murmur3_32 (const uchar *key, size_t len, uint32 seed)
 Compute 32-bit version of MurmurHash3 hash for the key. More...
 

Function Documentation

◆ murmur3_32()

uint32 murmur3_32 ( const uchar key,
size_t  len,
uint32  seed 
)

Compute 32-bit version of MurmurHash3 hash for the key.

Parameters
keyKey for which hash value to be computed.
lenKey length.
seedSeed for hash computation.
Note
WARNING! Since MurmurHash3 is known to be susceptible to "hash DoS" attack it should not be used in any situation where attacker has control over key being hashed and thus can cause performance problems due to degradation of hash lookup to linear list search.
Returns
Hash value for the key.