From e4230ef286794abcad6a42de0a54c113c19b93da Mon Sep 17 00:00:00 2001 From: "bryner@chromium.org" Date: Fri, 9 Sep 2011 04:35:22 +0000 Subject: Add a copy of the SMHasher library. MurmurHash3 will be used by SafeBrowsing phishing detection. We'll be modifying the page_words field in ClientSideModel with murmurhash3's of the words, rather than SHA-256 hashes, since SHA-256 is fairly expensive to compute. Note that on a murmurhash3 hit, we'll still do a SHA-256 check against page_terms, so this will not introduce term collisions. BUG=none TEST=none Review URL: http://codereview.chromium.org/7848010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100347 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/smhasher/LICENSE | 23 +++++++++++++++++++++++ third_party/smhasher/README.chromium | 12 ++++++++++++ third_party/smhasher/smhasher.gyp | 16 ++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 third_party/smhasher/LICENSE create mode 100644 third_party/smhasher/README.chromium create mode 100644 third_party/smhasher/smhasher.gyp (limited to 'third_party/smhasher') diff --git a/third_party/smhasher/LICENSE b/third_party/smhasher/LICENSE new file mode 100644 index 0000000..3f18a84 --- /dev/null +++ b/third_party/smhasher/LICENSE @@ -0,0 +1,23 @@ +All MurmurHash source files are placed in the public domain. + +The license below applies to all other code in SMHasher: + +Copyright (c) 2011 Google, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/third_party/smhasher/README.chromium b/third_party/smhasher/README.chromium new file mode 100644 index 0000000..dcf4bce --- /dev/null +++ b/third_party/smhasher/README.chromium @@ -0,0 +1,12 @@ +Name: SMHasher +URL: http://code.google.com/p/smhasher/ +Version: 0 +Revision: 136 +License: MIT (SMHasher), Public Domain (MurmurHash) +License File: LICENSE +Security Critical: yes + +Description: +This is a library containing the MurmurHash3 function, and a hashing function +test suite. + diff --git a/third_party/smhasher/smhasher.gyp b/third_party/smhasher/smhasher.gyp new file mode 100644 index 0000000..fa59c2c --- /dev/null +++ b/third_party/smhasher/smhasher.gyp @@ -0,0 +1,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. + +{ + 'targets': [ + { + 'target_name': 'murmurhash3', + 'type': 'static_library', + 'sources': [ + 'src/MurmurHash3.h', + 'src/MurmurHash3.cpp', + ], + }, + ], +} -- cgit v1.1