Fix CRC and hash calculations (#321)

* Fix CRC calculation, add more CRC parameters

Use the Boost CRC module to calculate the CRC values.
Add options for final xor value, reflectIn and reflectOut.
Fixes #320

* Cleanup Hash view combo box, add CRC8

* Use offset/size consistently

* Cleanup: unify processing data by chunks

* Change CRC algorithm back, drop boost dependency

This is mostly the original algorithm, with a few fixes and small
additions (support for reflect In / Out, final XOR value).

* Use size_t for file read size consistently
This commit is contained in:
RADICS Áron
2021-10-26 17:21:48 +02:00
committed by GitHub
parent cab1089e22
commit a6b8597f5a
5 changed files with 365 additions and 242 deletions

View File

@@ -146,6 +146,9 @@ namespace hex::plugin::builtin {
{ "hex.view.hashes.settings", "Settings" },
{ "hex.view.hashes.function", "Hash function" },
{ "hex.view.hashes.iv", "Initial value" },
{ "hex.view.hashes.xorout", "Final XOR value" },
{ "hex.common.reflectIn", "Reflect input" },
{ "hex.common.reflectOut", "Reflect output" },
{ "hex.view.hashes.poly", "Polynomial" },
{ "hex.view.hashes.result", "Result" },
@@ -666,4 +669,4 @@ namespace hex::plugin::builtin {
});
}
}
}