1
0
mirror of synced 2024-11-12 10:10:53 +01:00

sys: Added default polynomial and inital value for CRC16 and CRC32

This commit is contained in:
WerWolv 2021-06-06 18:00:14 +02:00
parent b1adfe38e1
commit 73b5c8512d

View File

@ -72,7 +72,7 @@ namespace hex {
switch (this->m_currHashFunction) {
case 0: // CRC16
{
static int polynomial = 0, init = 0;
static int polynomial = 0x8005, init = 0x0000;
ImGui::InputInt("hex.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
@ -97,7 +97,7 @@ namespace hex {
break;
case 1: // CRC32
{
static int polynomial = 0, init = 0;
static int polynomial = 0x04C11DB7, init = 0xFFFFFFFF;
ImGui::InputInt("hex.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;