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

@@ -13,13 +13,11 @@
namespace Nz
{
struct HashFletcher16_state;
class NAZARA_CORE_API HashFletcher16 : public AbstractHash
class NAZARA_CORE_API Fletcher16Hash final : public AbstractHash
{
public:
HashFletcher16();
virtual ~HashFletcher16();
Fletcher16Hash() = default;
~Fletcher16Hash() = default;
void Append(const UInt8* data, std::size_t len) override;
void Begin() override;
@@ -29,7 +27,8 @@ namespace Nz
const char* GetHashName() const override;
private:
HashFletcher16_state* m_state;
UInt16 m_sum1;
UInt16 m_sum2;
};
}