|
|
@ -9,6 +9,7 @@ |
|
|
|
string Checksum::checksum_of_file(string filepath, checksum_algorithms alg) { |
|
|
|
ifstream file (filepath, ios::ate); |
|
|
|
stringstream hex_result; |
|
|
|
// cout << "processing file '" << filepath << "'" << endl;
|
|
|
|
if (file.is_open() ) { |
|
|
|
ifstream::pos_type fileSize; |
|
|
|
char * memBlock; |
|
|
@ -34,6 +35,7 @@ string Checksum::checksum_of_file(string filepath, checksum_algorithms alg) { |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
delete memBlock; |
|
|
|
// cout << "# # CHECKSUM for filepath '" << filepath << "' " << hex_result.str() << endl;
|
|
|
|
file.close(); |
|
|
|
} else { |
|
|
@ -45,6 +47,7 @@ string Checksum::checksum_of_file(string filepath, checksum_algorithms alg) { |
|
|
|
oxum_t Checksum::oxum_of_file(string filepath) { |
|
|
|
ifstream file (filepath, ios::ate); |
|
|
|
oxum_t oxum; |
|
|
|
//cout << "processing file '" << filepath << "'" << endl;
|
|
|
|
if (file.is_open() ) { |
|
|
|
ifstream::pos_type fileSize; |
|
|
|
fileSize = file.tellg(); |
|
|
|