I tried two methods: 

1.


void CryptoHashes::makeFileHash(const QString &filePath)

{

FileSource f(filePath.toStdString().c_str(), true, new HashFilter(hash, new 
HexEncoder(new StringSink(digest))));

}



2.


void CryptoHashes::makeFileHash(const QString &filePath)

{

std::filesystem::path _path { 
std::filesystem::u8path(filePath.toStdString()) };

std::ifstream m_file(_path, std::ios::in);


FileSource f(m_file, true, new HashFilter(hash, new HexEncoder(new 
StringSink(digest))));

}



the only exception is that when I tried method 2, it always calculated hash 
of NULL, no matter which file I selected.

-- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/cryptopp-users/64e26ccb-51e8-4741-8726-aa385a8501a8n%40googlegroups.com.

Reply via email to