From be3c931f9b2db357c0b4306ad248c968d90254a3 Mon Sep 17 00:00:00 2001 From: Aleksi Lindeman Date: Sat, 10 Feb 2018 03:38:47 +0100 Subject: Add private/public key for users --- include/RemoteUser.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/RemoteUser.hpp (limited to 'include/RemoteUser.hpp') diff --git a/include/RemoteUser.hpp b/include/RemoteUser.hpp new file mode 100644 index 0000000..770be61 --- /dev/null +++ b/include/RemoteUser.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "User.hpp" + +namespace odhtdb +{ + class RemoteUser : public User + { + public: + static RemoteUser* create(const Signature::PublicKey &publicKey, const std::string &name) + { + return new RemoteUser(publicKey, name); + } + + const Signature::PublicKey& getPublicKey() const override + { + return publicKey; + } + private: + RemoteUser(const Signature::PublicKey &_publicKey, const std::string &name) : User(name), publicKey(_publicKey){} + private: + Signature::PublicKey publicKey; + }; +} -- cgit v1.2.3