2023-06-07 22:23:59 +03:00
|
|
|
//
|
|
|
|
// Created by neo on 6/6/2023.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef WINDOWSXPKG_BINK1998_H
|
|
|
|
#define WINDOWSXPKG_BINK1998_H
|
|
|
|
|
|
|
|
#include "header.h"
|
|
|
|
|
|
|
|
class BINK1998 {
|
2023-06-09 21:07:29 +03:00
|
|
|
static void Unpack(
|
|
|
|
QWORD (&pRaw)[2],
|
2023-06-10 19:38:22 +03:00
|
|
|
BOOL &pUpgrade,
|
2023-06-09 21:07:29 +03:00
|
|
|
DWORD &pSerial,
|
|
|
|
DWORD &pHash,
|
|
|
|
QWORD &pSignature
|
|
|
|
);
|
|
|
|
static void Pack(
|
|
|
|
QWORD (&pRaw)[2],
|
2023-06-10 19:38:22 +03:00
|
|
|
BOOL pUpgrade,
|
2023-06-09 21:07:29 +03:00
|
|
|
DWORD pSerial,
|
|
|
|
DWORD pHash,
|
|
|
|
QWORD pSignature
|
|
|
|
);
|
2023-06-07 22:23:59 +03:00
|
|
|
|
|
|
|
public:
|
2023-06-09 21:07:29 +03:00
|
|
|
static bool Verify(
|
|
|
|
EC_GROUP *eCurve,
|
|
|
|
EC_POINT *basePoint,
|
|
|
|
EC_POINT *publicKey,
|
|
|
|
char (&pKey)[25]
|
|
|
|
);
|
|
|
|
static void Generate(
|
|
|
|
EC_GROUP *eCurve,
|
|
|
|
EC_POINT *basePoint,
|
|
|
|
BIGNUM *genOrder,
|
|
|
|
BIGNUM *privateKey,
|
|
|
|
DWORD pSerial,
|
2023-06-10 19:38:22 +03:00
|
|
|
BOOL pUpgrade,
|
2023-06-09 21:07:29 +03:00
|
|
|
char (&pKey)[25]
|
|
|
|
);
|
2023-06-07 22:23:59 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //WINDOWSXPKG_BINK1998_H
|