-2

I want to calculate checksum of a string of hexadecimal values such as 040102 answer will 7 in this case and more complex as 0a0110000a3f800000 its answer will be AE.

I found an online link that gives me answer i want but i need to write code for same in python but not getting the output i want.

Please help Thank you in advance

5
  • 1
    Please share the code - see How to Ask. Commented Dec 29, 2020 at 8:57
  • @ack currently i don't have any code i was looking for some reference. Commented Dec 29, 2020 at 9:17
  • Does this help How do I calculate the MD5 checksum of a file in Python?? Commented Dec 29, 2020 at 16:58
  • @itprorh66 in my case i have to just XOR the values Commented Dec 30, 2020 at 4:01
  • this site can help solve specific, technical problems, not open-ended requests. Please edit your question to show what you have tried so far. See the How To Ask a Good Question and "How do I ask and answer homework questions?" pages for details on how to best help us help you. Commented Dec 30, 2020 at 20:19

1 Answer 1

0

I found the answer in which i can calculate checksum xor.

def HexToByte(hexStr): bytes = [] hexStr = ''.join(hexStr.split(" ")) for i in range(0, len(hexStr), 2): bytes.append(int(hexStr[i:i+2], 16)) return bytes 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.