clean up big-endian encryption

This commit is contained in:
Martin Michelsen
2022-08-24 00:48:49 -07:00
parent e808a7b6a3
commit 77cea58fc5
3 changed files with 31 additions and 13 deletions
+8
View File
@@ -39,10 +39,14 @@ public:
explicit PSOV2Encryption(uint32_t seed);
virtual void encrypt(void* data, size_t size, bool advance = true);
void encrypt_big_endian(void* data, size_t size, bool advance = true);
uint32_t next(bool advance = true);
protected:
template <typename LongT>
void encrypt_t(void* data, size_t size, bool advance);
void update_stream();
uint32_t stream[V2_STREAM_LENGTH + 1];
@@ -54,10 +58,14 @@ public:
explicit PSOV3Encryption(uint32_t key);
virtual void encrypt(void* data, size_t size, bool advance = true);
void encrypt_big_endian(void* data, size_t size, bool advance = true);
uint32_t next(bool advance = true);
protected:
template <typename LongT>
void encrypt_t(void* data, size_t size, bool advance);
void update_stream();
uint32_t stream[V3_STREAM_LENGTH];