fix picrypt and remove crypt_frag from PIStreamPacker

This commit is contained in:
2024-10-20 18:03:25 +03:00
parent ac8efc9f88
commit 315966504e
5 changed files with 25 additions and 71 deletions

View File

@@ -38,9 +38,8 @@ class PIStreamPackerConfig: public PIEthUtilBase {
public:
PIStreamPackerConfig() {
crypt_frag = crypt_size = false;
crypt_size = false;
aggressive_optimization = true;
crypt_frag_size = 1 * 1024 * 1024;
max_packet_size = 1400;
packet_sign = 0xAFBE;
}
@@ -65,10 +64,6 @@ public:
//! Returns aggressive optimization
bool aggressiveOptimization() const { return aggressive_optimization; }
bool cryptFragmentationEnabled() const { return crypt_frag; }
void setCryptFragmentationEnabled(bool on) { crypt_frag = on; }
int cryptFragmentationSize() const { return crypt_frag_size; }
void setCryptFragmentationSize(int size_) { crypt_frag_size = size_; }
bool cryptSizeEnabled() const { return crypt_size; }
void setCryptSizeEnabled(bool on) { crypt_size = on; }
@@ -80,8 +75,7 @@ public:
void setConfiguration(const PIStreamPackerConfig & config) { *this = config; }
private:
bool crypt_frag, crypt_size, aggressive_optimization;
int crypt_frag_size;
bool crypt_size, aggressive_optimization;
ushort packet_sign;
int max_packet_size;
};