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;

Комментарии

Популярные сообщения из этого блога

Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository … doesn't support architecture 'i386'

Connection string for MariaDB using ODBC

Celery like system based on django channels