Implement hex method in Packet