From 0e62cb8e5ed06d906ad84321cdda22acfcc952c9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 9 Mar 2018 10:26:55 +0100 Subject: Partially implement 'add' operation --- include/Signature.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/Signature.hpp') diff --git a/include/Signature.hpp b/include/Signature.hpp index aace383..62c41c3 100644 --- a/include/Signature.hpp +++ b/include/Signature.hpp @@ -2,6 +2,7 @@ #include "DataView.hpp" #include +#include namespace odhtdb { @@ -67,6 +68,9 @@ namespace odhtdb // Both exceptions are derived from UnsignException std::string unsign(const DataView &signedMessage) const; + size_t operator()() const; + bool operator==(const PublicKey &other) const; + std::string toString() const; private: PublicKey(){} @@ -74,6 +78,17 @@ namespace odhtdb char data[PUBLIC_KEY_NUM_BYTES]; }; + struct PublicKeyHasher + { + size_t operator()(const PublicKey &publicKey) const + { + return publicKey(); + } + }; + + template + using MapPublicKey = std::unordered_map; + class PrivateKey { friend class KeyPair; -- cgit v1.2.3