Skip to content
Snippets Groups Projects
Commit 5397f80b authored by François-Simon Fauteux-Chapleau's avatar François-Simon Fauteux-Chapleau Committed by Adrien Béraud
Browse files

value: preserve priority when encrypting

All encrypted values put on the DHT currently have the default priority
of 0 because the priority information is ignored by the Value::encrypt
function.
parent 88d0af9e
No related branches found
No related tags found
No related merge requests found
...@@ -271,6 +271,7 @@ Value::encrypt(const crypto::PrivateKey& from, const crypto::PublicKey& to) ...@@ -271,6 +271,7 @@ Value::encrypt(const crypto::PrivateKey& from, const crypto::PublicKey& to)
setRecipient(to.getId()); setRecipient(to.getId());
sign(from); sign(from);
Value nv {id}; Value nv {id};
nv.priority = priority;
nv.setCypher(to.encrypt(getToEncrypt())); nv.setCypher(to.encrypt(getToEncrypt()));
return nv; return nv;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment