From 71de63c6f4718bcbf3274d699cf9b8d885bb6c7c Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sat, 21 Sep 2024 11:08:54 +0800 Subject: [PATCH] feat: add 32-bit architecture supoort --- src/md5.h | 3 --- test/stream.cc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/md5.h b/src/md5.h index dbc319c..a521797 100644 --- a/src/md5.h +++ b/src/md5.h @@ -4,9 +4,6 @@ #include #include -static_assert(sizeof(uintptr_t) == 8, - "Project only works on 64-bits architecture."); - #ifdef _MSC_VER static_assert('\x01\x02\x03\x04' == 0x04030201, #else diff --git a/test/stream.cc b/test/stream.cc index 587a6c2..6f0d22a 100644 --- a/test/stream.cc +++ b/test/stream.cc @@ -8,7 +8,7 @@ TEST(md5sum, stream) { const auto test_data = build_test_data(256 * 256); MD5 md5; - for (uint64_t size = 1; size <= 256; ++size) { + for (uint32_t size = 1; size <= 256; ++size) { auto expect = MD5::Hash(test_data.data(), size * 256); for (int times = 0; times < 256; ++times) {