I am trying to write this pseudocode
checksum = 0
for each character, C, in the word {
rotate the (16 bit) checksum 1 bit to the right
XOR the character into the most significant byte of the checksum
}
The code that I have written so far, which isnt really working is;
int csum=0;
for(int i=0;i<c.length;i++)
{
csum = csum>>1;
csum=c[i]^(csum>>8);
}
c is an int array holding the word I want to generate the checksum from.
Can anyone see what is wrong? TIA