aboutsummaryrefslogtreecommitdiff
path: root/include/odhtdb/DatabaseNode.hpp
blob: c707af963a64410b37441cced2a437848faad49b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once

#include "Hash.hpp"
#include "OwnedMemory.hpp"
#include <memory>

namespace odhtdb
{
    class DatabaseNode
    {
    public:
        DatabaseNode() {}
        
        DatabaseNode(const std::shared_ptr<OwnedByteArray> &_encryptionKey, const std::shared_ptr<Hash> &_nodeHash) : 
            encryptionKey(_encryptionKey),
            nodeHash(_nodeHash)
        {
            
        }
        
        const std::shared_ptr<OwnedByteArray> getNodeEncryptionKey() const
        {
            return encryptionKey;
        }
        
        const std::shared_ptr<Hash> getRequestHash() const
        {
            return nodeHash;
        }
    private:
        std::shared_ptr<OwnedByteArray> encryptionKey;
        std::shared_ptr<Hash> nodeHash;
    };
}