mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
31 lines
530 B
C++
31 lines
530 B
C++
|
|
#pragma once
|
|
|
|
#include <windows.h>
|
|
#include "CryptoContext.h"
|
|
|
|
class CKeyPair
|
|
{
|
|
private:
|
|
static DWORD ms_dwRSAKeySize;
|
|
|
|
HCRYPTKEY m_hCryptKey;
|
|
CCryptoContext* m_pContext;
|
|
|
|
public:
|
|
CKeyPair(CCryptoContext* pContext);
|
|
~CKeyPair(void);
|
|
|
|
#ifdef ARCTOOL
|
|
void GenerateKey();
|
|
void LoadFromFile(PCHAR szFileName);
|
|
void WriteToFile(PCHAR szFileName);
|
|
void WriteCHeaderFile(PCHAR szFileName);
|
|
#endif
|
|
|
|
void LoadFromMemory(DWORD dwPubKeySize, BYTE* pbPubKeyBlob, BYTE bytXORKey);
|
|
void ReleaseKey();
|
|
|
|
HCRYPTKEY GetContainer();
|
|
};
|