PandA-2024.02
documentation
tutorial_fpl_2017
lab4
materials
4.1
checksum.c
Go to the documentation of this file.
1
#include <stdint.h>
2
3
#include "
checksum.h
"
4
5
uint8_t
checksum
(uint64_t in1, uint64_t in2)
6
{
7
uint8_t
sum
= 0;
8
for
(
int
i = 0; i <
sizeof
(uint64_t); i++)
9
{
10
uint8_t a = (in1 >> (8*i)) & 0xFF;
11
uint8_t b = (in2 >> (8*i)) & 0xFF;
12
sum += a + b;
13
}
14
return
sum
;
15
}
checksum
uint8_t checksum(uint64_t in1, uint64_t in2)
Definition:
checksum.c:5
sum
int sum
Definition:
dotproduct.h:3
checksum.h
Generated on Mon Feb 12 2024 13:02:48 for PandA-2024.02 by
1.8.13