mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2024-12-22 20:40:16 +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
|
#ifndef WINDOWSXPKG_BINK_H
|
||||||
#define 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, std::unordered_map<int, std::string>> Products;
|
||||||
std::unordered_map<std::string, ECDLP_Params> BINKData;
|
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() {
|
void initBink() {
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
27
header.h
27
header.h
@ -19,6 +19,8 @@
|
|||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
|
#include "bink.h"
|
||||||
|
|
||||||
#define PK_LENGTH 25
|
#define PK_LENGTH 25
|
||||||
#define NULL_TERMINATOR 1
|
#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);
|
void generateXPKey(char *pKey, EC_GROUP *eCurve, EC_POINT *generator, BIGNUM *order, BIGNUM *privateKey, ul32 *pRaw);
|
||||||
|
|
||||||
// server.cpp
|
// server.cpp
|
||||||
|
int verify2003(EC_GROUP *ec, EC_POINT *generator, EC_POINT *public_key, char *cdkey);
|
||||||
struct ECDLP_Params {
|
void generate2003(char *pkey, EC_GROUP *ec, EC_POINT *generator, BIGNUM *order, BIGNUM *priv, ul32 *osfamily, ul32 *prefix);
|
||||||
// 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_HEADER_H
|
#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)
|
void unpack2003(ul32 *osfamily, ul32 *hash, ul32 *sig, ul32 *prefix, ul32 *raw)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user