summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-12-09 11:58:32 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-12-13 23:17:32 +0100
commitef2fe9f793c0796beea292a12ad0a1577645ef01 (patch)
tree99bbc2f0a575e993d27f767e6287563613ef682c /include
parent7daf1c9835672a1a0731bcac30e5ae9751273c58 (diff)
downloadbarebox-ef2fe9f793c0796beea292a12ad0a1577645ef01.tar.gz
barebox-ef2fe9f793c0796beea292a12ad0a1577645ef01.tar.xz
crypto: crc32: add big endian CRC implementation
This implementation is a straight copy of the tableless implementation inside Linux' lib/crc32.c Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211209105832.3518384-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/crc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/crc.h b/include/crc.h
index eb972705c2..a5204aaabb 100644
--- a/include/crc.h
+++ b/include/crc.h
@@ -36,6 +36,7 @@ static inline u16 crc_itu_t_byte(u16 crc, const u8 data)
#endif
uint32_t crc32(uint32_t, const void *, unsigned int);
+uint32_t crc32_be(uint32_t, const void *, unsigned int);
uint32_t crc32_no_comp(uint32_t, const void *, unsigned int);
int file_crc(char *filename, unsigned long start, unsigned long size,
unsigned long *crc, unsigned long *total);