c++ trying to read bytes from files
I'm trying to scan files in c++, and making hashes for them. I'm trying to do it with the following function
std::string readFileBytes1(const char *name)
{
ifstream fl(name);
std::string line;
if (fl.is_open())
while (getline(fl, line));
fl.close();
return line;
}
but when I check the file's hash in an online md5 generator I get different results;
std::string readFileBytes1(const char *name)
{
ifstream fl(name);
std::string line;
if (fl.is_open())
while (getline(fl, line));
fl.close();
return line;
}
but when I check the file's hash in an online md5 generator I get different results;
Комментарии
Отправить комментарий