summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/safe_browsing/murmurhash3_util.cc
blob: 4134203e0ed60c5074cd1df561095c8c6dc0715f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/renderer/safe_browsing/murmurhash3_util.h"
#include "third_party/smhasher/src/MurmurHash3.h"

namespace safe_browsing {

uint32_t MurmurHash3String(const std::string& str, uint32_t seed) {
  uint32_t output;
  MurmurHash3_x86_32(str.data(), str.size(), seed, &output);
  return output;
}

}  // namespace safe_browsing