mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 12:16:15 +08:00
[arctool2] Add archive tool
This commit is contained in:
@ -20,6 +20,39 @@ CSigner::~CSigner(void)
|
||||
|
||||
//------------------------------------
|
||||
|
||||
#ifdef ARCTOOL
|
||||
void CSigner::SignHash(CHasher *pHasher)
|
||||
{
|
||||
if (m_pbSignature != NULL)
|
||||
delete[] m_pbSignature;
|
||||
|
||||
HCRYPTHASH hCryptHash = pHasher->GetContainer();
|
||||
CryptSignHash(hCryptHash, AT_SIGNATURE, NULL, CRYPT_NOHASHOID, NULL, &m_dwLength);
|
||||
m_pbSignature = new BYTE[m_dwLength];
|
||||
CryptSignHash(hCryptHash, AT_SIGNATURE, NULL, CRYPT_NOHASHOID, m_pbSignature, &m_dwLength);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------
|
||||
|
||||
#ifdef ARCTOOL
|
||||
BYTE* CSigner::GetSignature()
|
||||
{
|
||||
return m_pbSignature;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------
|
||||
|
||||
#ifdef ARCTOOL
|
||||
DWORD CSigner::GetSignatureLength()
|
||||
{
|
||||
return m_dwLength;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------
|
||||
|
||||
void CSigner::SetSignature(DWORD dwLength, BYTE *pbSignature)
|
||||
{
|
||||
if (m_pbSignature != NULL)
|
||||
|
Reference in New Issue
Block a user