fixed a few bugs in ftServer for encrypted tunnel management

This commit is contained in:
mr-alice 2016-10-30 11:36:00 +01:00
parent 9a881619e1
commit 34dcb410b4
5 changed files with 98 additions and 21 deletions

View file

@ -258,6 +258,7 @@ protected:
// fnds out what is the real hash of encrypted hash hash
bool findRealHash(const RsFileHash& hash, RsFileHash& real_hash);
bool findEncryptedHash(const RsPeerId& virtual_peer_id, RsFileHash& encrypted_hash);
bool encryptHash(const RsFileHash& hash, RsFileHash& hash_of_hash);
private:
@ -286,6 +287,7 @@ private:
std::string mPartialsPath;
std::map<RsFileHash,RsFileHash> mEncryptedHashes ; // This map is such that sha1(it->second) = it->first
std::map<RsPeerId,RsFileHash> mEncryptedPeerIds ; // This map holds the hash to be used with each peer id
};