folly::external::farmhash::Hash

Hash overloads

Synopses

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

Hashes a string's bytes to a size_t value.

template<typename Str>
size_t
Hash(Str const& s);
» more...

Hashes a byte array to a size_t value.

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

Return Value

  • The hash of the string.
  • The 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.