switch the XP algorithm to use bink.h data

create script in python to format said data to C
begin transition to using C++ functions
This commit is contained in:
Neo
2023-05-31 18:49:44 -07:00
parent 46adbee701
commit 3999ed0996
8 changed files with 195 additions and 64 deletions

View File

@@ -8,7 +8,12 @@
#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <string>
#include <vector>
#include <unordered_map>
#include <openssl/bn.h>
#include <openssl/ec.h>
@@ -23,4 +28,27 @@ void base24(uint8_t *c, uint32_t *x);
void print_product_key(uint8_t *pk);
void print_product_id(uint32_t *pid);
struct ECDLP_Params {
// p, a, b
std::tuple<std::string, std::string, std::string> E;
// x, y
std::tuple<std::string, std::string> K;
// x, y
std::tuple<std::string, std::string> G;
std::string n;
std::string k;
};
struct ProductID {
uint8_t SiteID;
uint16_t Serial;
};
extern std::unordered_map<std::string, std::unordered_map<int, std::string>> Products;
extern std::unordered_map<std::string, ECDLP_Params> BINKData;
void initBink();
#endif //WINDOWSXPKG_SHARED_H