folly::external::farmhash::Hash128

Hash128 overloads

Synopses

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

Hashes a string's bytes to a 128-bit value.

template<typename Str>
uint128_t
Hash128(Str const& s);
» more...

Hashes a byte array to a 128-bit value.

uint128_t
Hash128(
    char const* s,
    size_t len);
» more...

Return Value

  • The 128-bit hash of the string.
  • The 128-bit hash of the array.

Template Parameters

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

Parameters

NameDescription
sString to hash.
lenLength of the array, in bytes.