add more info to 6xB4x46 version messages

This commit is contained in:
Martin Michelsen
2023-10-04 23:13:13 -07:00
parent 7e84a5cb6a
commit 15c08c0101
3 changed files with 20 additions and 31 deletions
+8 -4
View File
@@ -39,8 +39,6 @@ protected:
class PSOLFGEncryption : public PSOEncryption {
public:
explicit PSOLFGEncryption(const std::string& serialized);
virtual void encrypt(void* data, size_t size, bool advance = true);
void encrypt_big_endian(void* data, size_t size, bool advance = true);
void encrypt_minus(void* data, size_t size, bool advance = true);
@@ -54,7 +52,12 @@ public:
uint32_t next(bool advance = true);
virtual std::string serialize() const;
inline uint32_t seed() const {
return this->initial_seed;
}
uint32_t absolute_offset() const {
return (this->cycles * this->end_offset) + this->offset;
}
protected:
PSOLFGEncryption(uint32_t seed, size_t stream_length, size_t end_offset);
@@ -64,7 +67,8 @@ protected:
std::vector<uint32_t> stream;
size_t offset;
size_t end_offset;
uint32_t seed;
uint32_t initial_seed;
size_t cycles;
};
class PSOV2Encryption : public PSOLFGEncryption {