Replaced reverse_dictionary with XOR reversible function for message_id generation.