From f6c047795d651962374fcb20d37359c763aeb9c8 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Tue, 28 Feb 2023 10:45:56 -0400 Subject: PSOV3EncryptionTCP: Add, and fully match `PSOV3EncryptionTCP` That was way easier than I expected, I thought it'd take a lot longer than this. --- context.h | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'context.h') diff --git a/context.h b/context.h index 2fcdc7f..52f9bb8 100644 --- a/context.h +++ b/context.h @@ -541,8 +541,34 @@ static inline void operator^=(object_flags &a, object_flags b) { a = a ^ b; }; static inline void operator&=(object_flags &a, object_flags b) { a = a & b; }; static inline void operator|=(object_flags &a, object_flags b) { a = a | b; }; -// pso/TSocket.h +// pso/TPlyGuildCardTag.h // Class defs. + +class TPlyGuildCardTag { + public: + u8 tag0; + u8 tag1; + u16 tag2; + u32 guildcard_number; + TPlyGuildCardTag &operator=(const TPlyGuildCardTag &src); + void bswap(); +} __packed__; + +// pso/PSOV3EncryptionTCP.h +class PSOV3EncryptionTCP : public PSOV3Encryption { +public: + PSOV3EncryptionTCP(); + ~PSOV3EncryptionTCP(); + + void reset(u32 seed); + void encrypt(void *void_data, int size); + + PRIVATE_MEMBER_ACCESSORS(u32, seed); +private: + u32 m_seed; +}; + +// pso/TSocket.h class TSocket : public TObject { private: void set_flags(u8 flags) { @@ -613,17 +639,6 @@ public: PRIVATE_MEMBER_ACCESSORS_FUNC(void, callback, TSocket *socket); }; -// pso/TPlyGuildCardTag.h -class TPlyGuildCardTag { - public: - u8 tag0; - u8 tag1; - u16 tag2; - u32 guildcard_number; - TPlyGuildCardTag &operator=(const TPlyGuildCardTag &src); - void bswap(); -} __packed__; - // pso/THeap.h class THeap { public: -- cgit v1.2.3-13-gbd6f