legacy_hash.cc 713 B

1234567891011121314151617181920212223
  1. // Copyright 2019 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.
  4. #include "base/hash/legacy_hash.h"
  5. #include "base/third_party/cityhash_v103/src/city_v103.h"
  6. namespace base {
  7. namespace legacy {
  8. uint64_t CityHash64(base::span<const uint8_t> data) {
  9. return internal::cityhash_v103::CityHash64(
  10. reinterpret_cast<const char*>(data.data()), data.size());
  11. }
  12. uint64_t CityHash64WithSeed(base::span<const uint8_t> data, uint64_t seed) {
  13. return internal::cityhash_v103::CityHash64WithSeed(
  14. reinterpret_cast<const char*>(data.data()), data.size(), seed);
  15. }
  16. } // namespace legacy
  17. } // namespace base