Rework hashes (also fix Fletcher16 and CRC64)

This commit is contained in:
Jérôme Leclercq
2022-02-10 01:46:58 +01:00
parent 52100e3b3b
commit 97ee89afb7
29 changed files with 1262 additions and 1330 deletions

View File

@@ -18,7 +18,7 @@ namespace Nz
inline ByteArray File::ComputeHash(HashType hash, const std::filesystem::path& filePath)
{
return ComputeHash(AbstractHash::Get(hash).get(), filePath);
return ComputeHash(*AbstractHash::Get(hash), filePath);
}
/*!
@@ -29,7 +29,7 @@ namespace Nz
* \param filePath Path for the file
*/
inline ByteArray File::ComputeHash(AbstractHash* hash, const std::filesystem::path& filePath)
inline ByteArray File::ComputeHash(AbstractHash& hash, const std::filesystem::path& filePath)
{
return Nz::ComputeHash(hash, File(filePath));
}