logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_murmur3_32 - Calculate a 32-bit MurmurHash3 value for a block of data.

Availability

       This function is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                                  SDL_murmur3_32(3)

Description

       https://en.wikipedia.org/wiki/MurmurHash

       A  seed  may  be  specified,  which  changes  the final results consistently, but this does not work like
       SDL_crc16 and SDL_crc32: you can't feed a previous result from this function back into itself as the next
       seed value to calculate a hash in chunks; it won't produce the same hash as it would if the same data was
       provided in a single call.

       If you aren't sure what to provide for a seed, zero is fine. Murmur3 is not cryptographically secure,  so
       it shouldn't be used for hashing top-secret data.

Function Parameters

data   the data to be hashed.

       len    the size of data, in bytes.

       seed   a value that alters the final hash value.

Name

       SDL_murmur3_32 - Calculate a 32-bit MurmurHash3 value for a block of data.

Return Value

       Returns a Murmur3 32-bit hash value.

Synopsis

#include<SDL3/SDL_stdinc.h>Uint32SDL_murmur3_32(constvoid*data,size_tlen,Uint32seed);

Thread Safety

       It is safe to call this function from any thread.

See Also