This commit is contained in:
Martin Michelsen
2022-12-02 23:35:02 -08:00
parent 85fbd1b389
commit 9f4b53178a
2 changed files with 45 additions and 0 deletions
+16
View File
@@ -18,6 +18,7 @@ public:
V2 = 0,
V3,
BB,
JSD0,
};
virtual ~PSOEncryption() = default;
@@ -229,4 +230,19 @@ protected:
class JSD0Encryption : public PSOEncryption {
public:
JSD0Encryption(const void* seed, size_t seed_size);
virtual void encrypt(void* data, size_t size, bool advance = true);
virtual void decrypt(void* data, size_t size, bool advance = true);
virtual Type type() const = 0;
private:
uint8_t key;
};
void decrypt_trivial_gci_data(void* data, size_t size, uint8_t basis);