aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/hash.h
blob: cc1b136a86664e229c60bb3a93e55ca42a72a9ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <util/str_stl.h>
#include <util/digest/numeric.h>

namespace NBus {
    namespace NPrivate {
        template <typename T>
        size_t Hash(const T& val) {
            return THash<T>()(val);
        }

        template <typename T, typename U>
        size_t HashValues(const T& a, const U& b) {
            return CombineHashes(Hash(a), Hash(b));
        }

    }
}