aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/hash.h
blob: d20bb370b70e1edb46cd2aaebf713f79eaea6aac (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)); 
        } 

    }
}