Skip to content

Instantly share code, notes, and snippets.

@astagi
Last active Dec 23, 2019
Embed
What would you like to do?
R2D2
let calculateChk = (buff) => {
let ret = 0x00;
for (let i = 0 ; i < buff.length ; i++) {
ret += buff[i];
}
ret = ret & 255;
return (ret ^ 255);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment