add support for modified BB encryption

This commit is contained in:
Martin Michelsen
2022-04-09 21:52:18 -07:00
parent 87b80b3c99
commit a078c9f712
3 changed files with 34 additions and 15 deletions
+5 -2
View File
@@ -65,8 +65,11 @@ protected:
class PSOBBEncryption : public PSOEncryption {
public:
struct KeyFile {
uint32_t initial_keys[18];
uint32_t private_keys[1024];
// initial_keys are actually a stream of uint32_ts, but we treat them as
// bytes for code simplicity
uint8_t initial_keys[0x12 * 4];
uint32_t private_keys[0x400];
uint8_t is_modcrypt;
} __attribute__((packed));
PSOBBEncryption(const KeyFile& key, const void* seed, size_t seed_size);