diff --git a/lib/libimhex/include/hex/helpers/crypto.hpp b/lib/libimhex/include/hex/helpers/crypto.hpp index 08d5c8642..37629b71a 100644 --- a/lib/libimhex/include/hex/helpers/crypto.hpp +++ b/lib/libimhex/include/hex/helpers/crypto.hpp @@ -16,7 +16,7 @@ namespace hex::crypt { void initialize(); void exit(); - u16 crc8(prv::Provider *&data, u64 offset, size_t size, u32 polynomial, u32 init, u32 xorout, bool reflectIn, bool reflectOut); + u8 crc8(prv::Provider *&data, u64 offset, size_t size, u32 polynomial, u32 init, u32 xorout, bool reflectIn, bool reflectOut); u16 crc16(prv::Provider *&data, u64 offset, size_t size, u32 polynomial, u32 init, u32 xorout, bool reflectIn, bool reflectOut); u32 crc32(prv::Provider *&data, u64 offset, size_t size, u32 polynomial, u32 init, u32 xorout, bool reflectIn, bool reflectOut); diff --git a/lib/libimhex/source/helpers/crypto.cpp b/lib/libimhex/source/helpers/crypto.cpp index 99609b482..5b3de4da9 100644 --- a/lib/libimhex/source/helpers/crypto.cpp +++ b/lib/libimhex/source/helpers/crypto.cpp @@ -157,7 +157,7 @@ namespace hex::crypt { return crc.checksum(); } - u16 crc8(prv::Provider *&data, u64 offset, size_t size, u32 polynomial, u32 init, u32 xorOut, bool reflectIn, bool reflectOut) { + u8 crc8(prv::Provider *&data, u64 offset, size_t size, u32 polynomial, u32 init, u32 xorOut, bool reflectIn, bool reflectOut) { return calcCrc<8>(data, offset, size, polynomial, init, xorOut, reflectIn, reflectOut); } diff --git a/plugins/builtin/source/content/hashes.cpp b/plugins/builtin/source/content/hashes.cpp index fd698201f..988ab7509 100644 --- a/plugins/builtin/source/content/hashes.cpp +++ b/plugins/builtin/source/content/hashes.cpp @@ -173,7 +173,7 @@ namespace hex::plugin::builtin { ContentRegistry::Hashes::add(); ContentRegistry::Hashes::add(); - ContentRegistry::Hashes::add>("hex.builtin.hash.crc8", crypt::crc8, 0x07, 0x0000, 0x0000); + 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);