refactor: aggregate arc4 into libtransmission (#3684)

This commit is contained in:
Charles Kerr
2022-08-20 13:41:40 -05:00
committed by GitHub
parent d2852b6043
commit 5bcbb7e34b
10 changed files with 117 additions and 102 deletions

View File

@@ -17,8 +17,9 @@
#include "tr-macros.h" // tr_sha1_digest_t
#include "tr-assert.h"
#include "tr-arc4.h"
struct arc4_context;
class tr_arc4;
// Spec: https://wiki.vuze.com/w/Message_Stream_Encryption
namespace tr_message_stream_encryption
@@ -81,8 +82,8 @@ public:
void encrypt(size_t buf_len, void* buf);
private:
std::shared_ptr<struct arc4_context> dec_key_;
std::shared_ptr<struct arc4_context> enc_key_;
std::unique_ptr<tr_arc4> dec_key_;
std::unique_ptr<tr_arc4> enc_key_;
};
} // namespace tr_message_stream_encryption