Witam! Zgodnie z opisem z tej strony//toxygen.net/libgadu/protocol/#ch3, hasło powinno się wysłać shaszowane, a narzedziem do tego jest algorytm sha zawarty w bibliotece openssl. Skopiowałem pliki z tej biblioteki do folderów Visuala a jednak wyświetla mi się taki błąd:
Error 4 error LNK2019: unresolved external symbol _SHA_Update referenced in function "char * __cdecl gg_sha_hash(char const *,unsigned int)" (?gg_sha_hash@@YAPADPBDI@Z) delete.obj dele
a oto kawałek kodu :
#include <iostream>
#include <WinSock2.h>
#include <Windows.h>
#include <string>
#include <openssl/sha.h>
#include "Unit1.h"
using namespace std;
char *gg_sha_hash(const char *password, unsigned int seed)
{
SHA_CTX ctx;
static char result[20];
SHA_Init(&ctx);
SHA_Update(&ctx, password, strlen(password));
SHA_Update(&ctx, &seed, sizeof(seed));
// SHA_Final((unsigned char *)result, &ctx);
return result;
}
co może być powodem wyświetlania błędu? Nie mam już pomysłów.