From 2036dc91e6f5cf3f65c121ec1eb033be3c654b1d Mon Sep 17 00:00:00 2001 From: qux-bbb <1147635419@qq.com> Date: Fri, 17 Nov 2023 05:24:55 +0800 Subject: [PATCH] impr: Make CRC-32 use reflected version by default (#1406) ### Problem description Before this PR, the CRC-32 value of ImHex is not like most of others. ### Implementation description Just set m_reflectIn and m_reflectOut of CRC-32 true by default. --- plugins/builtin/source/content/hashes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/hashes.cpp b/plugins/builtin/source/content/hashes.cpp index af5a8c702..ea5f63c45 100644 --- a/plugins/builtin/source/content/hashes.cpp +++ b/plugins/builtin/source/content/hashes.cpp @@ -178,7 +178,7 @@ namespace hex::plugin::builtin { ContentRegistry::Hashes::add>("hex.builtin.hash.crc8", crypt::crc8, 0x07, 0x0000, 0x0000); ContentRegistry::Hashes::add>("hex.builtin.hash.crc16", crypt::crc16, 0x8005, 0x0000, 0x0000); - ContentRegistry::Hashes::add>("hex.builtin.hash.crc32", crypt::crc32, 0x04C1'1DB7, 0xFFFF'FFFF, 0xFFFF'FFFF); + ContentRegistry::Hashes::add>("hex.builtin.hash.crc32", crypt::crc32, 0x04C1'1DB7, 0xFFFF'FFFF, 0xFFFF'FFFF, true, true); ContentRegistry::Hashes::add>("hex.builtin.hash.crc32mpeg", crypt::crc32, 0x04C1'1DB7, 0xFFFF'FFFF, 0x0000'0000, false, false); ContentRegistry::Hashes::add>("hex.builtin.hash.crc32posix", crypt::crc32, 0x04C1'1DB7, 0x0000'0000, 0xFFFF'FFFF, false, false); ContentRegistry::Hashes::add>("hex.builtin.hash.crc32c", crypt::crc32, 0x1EDC'6F41, 0xFFFF'FFFF, 0xFFFF'FFFF, true, true);