Announcement

Collapse
No announcement yet.

How To XOR Message Bytes To Calcualte Checksum Using Python

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To XOR Message Bytes To Calcualte Checksum Using Python

    Hi after a large amount of online research i have finally been able to build the necessary pytho n code to XOR calculate the Checkup needed for the messages in Diablo16

    Please see Python code below:

    original_message = '0x01 0x2F 0x01 0x00 0x64'
    message = [chr(int(x, 16)) for x in original_message.split(' ')]

    checksum = 0
    for el in message:
    checksum ^= ord(el)

    Full_Message = (original_message + ' ' + (hex(checksum)))
    print (Full_Message)

    I trust the above code will save others new to working with 4DSystem displays and using python on their host a heap of time and effort

    Regards Claude Raiola
    Last edited by SpeedlessAustralia; 29 August 2020, 02:31 PM.
Working...
X