summaryrefslogtreecommitdiff
path: root/context.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-02-28 10:45:56 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-02-28 10:45:56 -0400
commitf6c047795d651962374fcb20d37359c763aeb9c8 (patch)
treef90b4649b1a4fbaf5cec491462157d8dbc1020c6 /context.h
parent9326e63440b08f877302a87afbe1ef82d5cd2c76 (diff)
PSOV3EncryptionTCP: Add, and fully match `PSOV3EncryptionTCP`
That was way easier than I expected, I thought it'd take a lot longer than this.
Diffstat (limited to 'context.h')
-rw-r--r--context.h39
1 files changed, 27 insertions, 12 deletions
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: