What is the best way to calculate a UDP datagram checksum? Out of Python
's MD5, SHA256 or any other method, which method can surely help in identifying a corrupt packet? Also, my datagram is of the format:
packet = struct.pack('HH', seq_num, checksum) + payload
, where payload
is the message I'm sending to the receiver. So, should I calculate the checksum in this case for the packet ?