mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2024-12-22 12:30:17 +02:00
Remove BINK.h dependency on header.h
This commit is contained in:
parent
814b8e48fb
commit
62e2e37373
@ -14,11 +14,28 @@ with open('bink.h', 'w') as out:
|
||||
#ifndef WINDOWSXPKG_BINK_H
|
||||
#define WINDOWSXPKG_BINK_H
|
||||
|
||||
#include "header.h"
|
||||
|
||||
std::unordered_map<std::string, std::unordered_map<int, std::string>> Products;
|
||||
std::unordered_map<std::string, ECDLP_Params> BINKData;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
void initBink() {
|
||||
''')
|
||||
|
||||
|
27
header.h
27
header.h
@ -19,6 +19,8 @@
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#include "bink.h"
|
||||
|
||||
#define PK_LENGTH 25
|
||||
#define NULL_TERMINATOR 1
|
||||
|
||||
@ -48,28 +50,7 @@ bool verifyXPKey(EC_GROUP *eCurve, EC_POINT *generator, EC_POINT *publicKey, cha
|
||||
void generateXPKey(char *pKey, EC_GROUP *eCurve, EC_POINT *generator, BIGNUM *order, BIGNUM *privateKey, ul32 *pRaw);
|
||||
|
||||
// server.cpp
|
||||
|
||||
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();
|
||||
int verify2003(EC_GROUP *ec, EC_POINT *generator, EC_POINT *public_key, char *cdkey);
|
||||
void generate2003(char *pkey, EC_GROUP *ec, EC_POINT *generator, BIGNUM *order, BIGNUM *priv, ul32 *osfamily, ul32 *prefix);
|
||||
|
||||
#endif //WINDOWSXPKG_HEADER_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "bink.h"
|
||||
#include "header.h"
|
||||
|
||||
void unpack2003(ul32 *osfamily, ul32 *hash, ul32 *sig, ul32 *prefix, ul32 *raw)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user