RappelzRU.ini
well this topic is how to encrypt file RappelzRU.ini
It is like l2.ini encrypt something this:
Code:
#include "stdafx.h"
#include <Windows.h>
#include <Wincrypt.h>
int _tmain(int argc, _TCHAR* argv[])
{
unsigned char dane[2]="text from ini file";
DWORD LEN = 1024;
HCRYPTPROV hProvider = NULL;
HCRYPTHASH hHash = NULL;
HCRYPTKEY hKey = NULL;
BOOL bRes;
DWORD ddLen = LEN;
bRes = CryptAcquireContext( &hProvider, NULL, MS_DEF_PROV, 1, 0xF0000000 );
bRes = CryptCreateHash( hProvider, CALG_MD5, NULL, NULL, &hHash );
bRes = CryptHashData( hHash, (BYTE*)"RappelzKR", 4, NULL );
bRes = CryptDeriveKey( hProvider, CALG_RC4, hHash, CRYPT_CREATE_SALT, &hKey);
bRes = CryptDestroyHash( hHash );
bRes = CryptDecrypt( hKey, NULL, FALSE, NULL, dane, &LEN );
bRes = CryptDestroyKey( hKey );
return 0;
}
please if you do this post manual howto