100/180 mm PAPERLESS GRAPHIC RECORDER: USER GUIDE
HA028910
Issue 13 Sep 16
User Guide
Page 284
8.2.4 SECURITY (Cont.)
// Compare the next byte with key2
if(ibyte < dataLen)
{
encryptedData[ibyte++] ^= key2;
}
}
/* Now EXOR each byte to the next byte until no more are available
if all goes well the last byte in the array should never change */
for(ibyte=0; ibyte < (dataLen-1); ibyte++)
{
encryptedData[ibyte] = (encryptedData[ibyte] ^ encryptedData[ibyte+1]);
}
// Now add all the bytes together to get a 16 bit value result
for(ibyte=0; ibyte < dataLen; ibyte++)
{
byte= encryptedData[ibyte];
}
// Return the encrypted string as a 16 bit value
return(byteResult);
}
Notes:
1. If login is accepted, a standard response is sent to the master
2 If three invalid logins are sent, by the master, then an ‘illegal address’ exception code (2) is sent
to the master.