summaryrefslogtreecommitdiff
path: root/src/lib/crc/crc8.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-04-29 22:23:09 +0200
committerSander Vrijders <sander@ouroboros.rocks>2026-05-06 09:05:08 +0200
commit146ba945e23c2266d5e31035135b5d158d1256e8 (patch)
tree02b93c9cfb5a1528a8efd79255c4940eb09c8655 /src/lib/crc/crc8.c
parent4cfc607ebbff840991d893a8c0fa3a004caeb416 (diff)
downloadouroboros-146ba945e23c2266d5e31035135b5d158d1256e8.tar.gz
ouroboros-146ba945e23c2266d5e31035135b5d158d1256e8.zip
lib: Fix and clean up crc implementation
Fixes detection of PMULL on aarch64 without crypto extensions. Adds a crc64_nvme_step helper function in CRC64 to avoid code duplication and cleans up the comments. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/crc/crc8.c')
-rw-r--r--src/lib/crc/crc8.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/crc/crc8.c b/src/lib/crc/crc8.c
index e8b9685a..20976b29 100644
--- a/src/lib/crc/crc8.c
+++ b/src/lib/crc/crc8.c
@@ -34,10 +34,8 @@
#include <ouroboros/crc8.h>
-/* Bit-by-bit MSB-first CRC. The expected use case is header check
- * sequences of a handful of bytes; a 256-byte lookup table would not
- * pay for the extra .rodata footprint at typical input sizes.
- */
+
+ /* Bit-by-bit MSB-first CRC. */
void crc8_autosar(uint8_t * crc,
const void * buf,
size_t len)