mgiuca@chromium.org | e1be639 | 2014-03-03 16:59:27 +0900 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
jbates@chromium.org | 68c7aea | 2012-09-01 09:55:09 +0900 | [diff] [blame] | 4 | |
| 5 | #include "base/hash.h" |
| 6 | |
mgiuca@chromium.org | e1be639 | 2014-03-03 16:59:27 +0900 | [diff] [blame] | 7 | // Definition in base/third_party/superfasthash/superfasthash.c. (Third-party |
| 8 | // code did not come with its own header file, so declaring the function here.) |
mgiuca@chromium.org | bc5c874 | 2014-03-06 14:56:59 +0900 | [diff] [blame] | 9 | // Note: This algorithm is also in Blink under Source/wtf/StringHasher.h. |
mgiuca@chromium.org | e1be639 | 2014-03-03 16:59:27 +0900 | [diff] [blame] | 10 | extern "C" uint32_t SuperFastHash(const char* data, int len); |
jbates@chromium.org | 68c7aea | 2012-09-01 09:55:09 +0900 | [diff] [blame] | 11 | |
| 12 | namespace base { |
| 13 | |
mgiuca@chromium.org | e1be639 | 2014-03-03 16:59:27 +0900 | [diff] [blame] | 14 | uint32 SuperFastHash(const char* data, int len) { |
| 15 | return ::SuperFastHash(data, len); |
jbates@chromium.org | 68c7aea | 2012-09-01 09:55:09 +0900 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | } // namespace base |