summaryrefslogtreecommitdiff
path: root/lib/crc8.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-12-07 10:24:12 -0700
committerTom Rini <[email protected]>2024-12-12 16:35:24 -0600
commitf0315babfb43c6d1f5d4ff0ea7554ec2c27bf7b1 (patch)
tree05e5b0e9c3e37875d659aa2f30b9173e84686293 /lib/crc8.c
parent63702119d65c23602fa386766593c4ade6e6c7e7 (diff)
hash: Plumb crc8 into the hash functions
Add an entry for crc8, with watchdog handling. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'lib/crc8.c')
-rw-r--r--lib/crc8.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/crc8.c b/lib/crc8.c
index 20d46d16147..811e19917b4 100644
--- a/lib/crc8.c
+++ b/lib/crc8.c
@@ -32,3 +32,9 @@ unsigned int crc8(unsigned int crc, const unsigned char *vptr, int len)
return crc;
}
+
+void crc8_wd_buf(const unsigned char *input, unsigned int len,
+ unsigned char output[1], unsigned int chunk_sz)
+{
+ *output = crc8(0, input, len);
+}