Problem: curve_encoding_t involves unnecesary heap allocations and copying of message data

Solution: use crypto_box_easy_afternm and crypto_box_open_easy_afternm
in-place
This commit is contained in:
Simon Giesecke
2020-02-03 15:26:29 +01:00
parent 2fa8185340
commit 4177bf7445
4 changed files with 169 additions and 66 deletions

View File

@@ -161,6 +161,8 @@ class msg_t
// references drops to 0, the message is closed and false is returned.
bool rm_refs (int refs_);
void shrink (size_t new_size_);
// Size in bytes of the largest message that is still copied around
// rather than being reference-counted.
enum