Hash32WithSeed overloads

Synopses

Declared in <folly/external/farmhash/farmhash.h>

Hashes a string's bytes to a 32‐bit value, mixing in a 32‐bit seed.

template<typename Str>
uint32_t
Hash32WithSeed(
    Str const& s,
    uint32_t seed);

Hashes a byte array to a 32‐bit value, mixing in a 32‐bit seed.

uint32_t
Hash32WithSeed(
    char const* s,
    size_t len,
    uint32_t seed);

Return Value

  • The 32‐bit hash of the string.

  • The 32‐bit hash of the array.

Template Parameters

Name

Description

Str

String type whose data() and length() give the bytes to hash.

Parameters

Name

Description

s

String to hash.

seed

32‐bit seed mixed into the result.

len

Length of the array, in bytes.

Created with MrDocs