From a19e68b9b029d5374604e4b81dcff161d4b465ba Mon Sep 17 00:00:00 2001 From: dec05eba 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