среда, 29 декабря 2010 г.

also interest

http://stackoverflow.com/questions/1220046/in-c-how-to-get-md5-hash-of-a-file

Using Crypto++, you could do the following:

#include 
#include

SHA256 sha
;
while ( !f.eof() ) {
char buff[4096];
int numchars = f.read(...);
sha
.Update(buff, numchars);
}
char hash[size];
sha
.Final(hash);
cout
hash endl;