#ifndef BCC_H
#define BCC_H
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
unsigned char BCC(unsigned char *bytes, size_t bytesLength);
#ifdef __cplusplus
}
#endif
#endif
#include "BCC.h"
unsigned char BCC(unsigned char* bytes, size_t bytesLength) {
unsigned char byte = 0;
for (size_t i = 0; i < bytesLength; i++) {
byte ^= bytes[i];
}
return byte;
}