PandA-2024.02
main.c
Go to the documentation of this file.
1 #include <stdbool.h>
2 #include <stdint.h>
3 
4 #include "checksum.h"
5 
6 bool have_same_checksum(uint64_t original1, uint64_t original2, uint64_t reference1, uint64_t reference2) {
7  uint8_t sum_or = checksum(original1, original2);
8  uint8_t sum_ref = checksum(reference1, reference2);
9  return sum_or != sum_ref;
10 }
11 
12 int test(uint64_t original1, uint64_t original2, uint64_t reference1, uint64_t reference2, bool must_be_equal)
13 {
14  return !(have_same_checksum(1ull,2ull,1ull,2ull) == must_be_equal);
15 }
uint8_t checksum(uint64_t in1, uint64_t in2)
Definition: checksum.c:5
int test(uint64_t original1, uint64_t original2, uint64_t reference1, uint64_t reference2, bool must_be_equal)
Definition: main.c:12
bool have_same_checksum(uint64_t original1, uint64_t original2, uint64_t reference1, uint64_t reference2)
Definition: main.c:6

Generated on Mon Feb 12 2024 13:02:48 for PandA-2024.02 by doxygen 1.8.13