WindowsXPKg/src/BINK2002.h

66 lines
1.8 KiB
C
Raw Normal View History

/**
2023-06-17 00:58:22 +03:00
* This file is a part of the UMSKT Project
*
2023-06-17 00:58:22 +03:00
* Copyleft (C) 2019-2023 UMSKT Contributors (et.al.)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @FileCreated by Neo on 6/6/2023
* @Maintainer Neo
*/
2023-06-07 22:23:59 +03:00
2023-06-17 00:58:22 +03:00
#ifndef UMSKT_BINK2002_H
#define UMSKT_BINK2002_H
2023-06-07 22:23:59 +03:00
#include "header.h"
class BINK2002 {
2023-06-09 21:07:29 +03:00
static void Unpack(
QWORD (&pRaw)[2],
2023-06-10 20:17:18 +03:00
BOOL &pUpgrade,
2023-06-09 21:07:29 +03:00
DWORD &pChannelID,
DWORD &pHash,
QWORD &pSignature,
DWORD &pAuthInfo
);
static void Pack(
QWORD (&pRaw)[2],
2023-06-10 20:17:18 +03:00
BOOL pUpgrade,
2023-06-09 21:07:29 +03:00
DWORD pChannelID,
DWORD pHash,
QWORD pSignature,
DWORD pAuthInfo
);
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 (&cdKey)[25]
);
static void Generate(
EC_GROUP *eCurve,
EC_POINT *basePoint,
BIGNUM *genOrder,
BIGNUM *privateKey,
DWORD pChannelID,
DWORD pAuthInfo,
2023-06-10 20:17:18 +03:00
BOOL pUpgrade,
2023-06-09 21:07:29 +03:00
char (&pKey)[25]
);
2023-06-07 22:23:59 +03:00
};
2023-06-17 00:58:22 +03:00
#endif //UMSKT_BINK2002_H