Various utilities for filters to call upon.
A context manager which helps filters modify data that has been checksummed. Tell it what the original protocol was and pass a dict containing the data to be mangled in the ‘data’ key, then use the assigned value after entry as a string ignoring its checksum and modify it as you please. On exit, if the orignal checksum was valid a new and valid checksum will be written to the modified data, otherwise the original sentence is placed back into the dict.
Store the original data and our protocol