winAPI做hash加密

#include #include using namespace std; #include #include #include #include #include #include #define BOLCKSIZE 184320 DWORD ComputeHash(CONST BYTE *pbData, DWORD dwDataLen, ALG_ID algId, BYTE*& pbOutHash, DWORD& dwHashLen,BOOL showDBInfo=FALSE); int main() { vector hashVec; FILE *file=_tfsopen(_T("protocol_4f_54.txt"),_T("rb"),_SH_DENYNO); if(!file) { printf("open file fail!/n"); return -1; } int fileSize=_filelengthi64(file->_file); printf("file size:%d/n",fileSize); //设置缓冲区大小 //setvbuf(file,NULL,_IOFBF,1024*8*2); BYTE* pbOutHash; DWORD dwHashLen; //char pbData[9728000]="wangxijie/0"; char* pbData=new char[BOLCKSIZE]; int dwDataLen=strlen(pbData); int togo=0; size_t realLen; while(togo  

 

你可能感兴趣的:(C/C++,winapi,加密,byte,file,delete,null)