2 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/json
10 #ifndef BOOST_JSON_DETAIL_DIGEST_HPP
11 #define BOOST_JSON_DETAIL_DIGEST_HPP
16 // Calculate salted digest of string
22 std::size_t salt) noexcept
24 #if BOOST_JSON_ARCH == 64
25 std::uint64_t const prime = 0x100000001B3ULL;
26 std::uint64_t hash = 0xcbf29ce484222325ULL;
28 std::uint32_t const prime = 0x01000193UL;
29 std::uint32_t hash = 0x811C9DC5UL;
33 hash = (*s ^ hash) * prime;