aboutsummaryrefslogtreecommitdiff
path: root/include/DatabaseNode.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-03-11 00:12:37 +0100
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:25:46 +0200
commit6099ec04bd0d98b9e75f5b55b1215c94ccf20202 (patch)
tree9a551e8e723cde057610d6071587bc76b4a6af19 /include/DatabaseNode.hpp
parent0e62cb8e5ed06d906ad84321cdda22acfcc952c9 (diff)
Add operation to allow users to be added to group
WARNING! Lazy implementation everywhere, does not handle out-of-order packets
Diffstat (limited to 'include/DatabaseNode.hpp')
-rw-r--r--include/DatabaseNode.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/DatabaseNode.hpp b/include/DatabaseNode.hpp
new file mode 100644
index 0000000..3ca4be3
--- /dev/null
+++ b/include/DatabaseNode.hpp
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "Hash.hpp"
+#include <memory>
+
+namespace odhtdb
+{
+ class DatabaseNode
+ {
+ public:
+ DatabaseNode(const std::shared_ptr<char*> &_encryptionKey, const std::shared_ptr<Hash> &_nodeHash) :
+ encryptionKey(_encryptionKey),
+ nodeHash(_nodeHash)
+ {
+
+ }
+
+ const std::shared_ptr<char*> getNodeEncryptionKey() const
+ {
+ return encryptionKey;
+ }
+
+ const std::shared_ptr<Hash> getRequestHash() const
+ {
+ return nodeHash;
+ }
+ private:
+ std::shared_ptr<char*> encryptionKey;
+ std::shared_ptr<Hash> nodeHash;
+ };
+}