2021-03-19, 05:25 PM
(2021-03-19, 04:59 PM)Txalamar Wrote: I think I even wont have to recalculate the Checksum
Creating a valid checksum only a few lines >>
Code:
char checkSum(String theseChars) {
char check = 0;
// iterate over the string, XOR each byte with the total sum:
for (int c = 0; c < theseChars.length(); c++) {
check = char(check ^ theseChars.charAt(c));
}
// return the result
return check;
}