code: def validate(self, data, offset):
          
          recorded_checksum = self.field.getval()
  
          # convert negative offset to positive
          if offset < 0:
              offset += len(data)
  
          # replace checksum region with zero
          data = b''.join((data[:offset],
                           b"\x00" * self.bytes_required,
                           data[offset + self.bytes_required:]))
          actual_checksum = self.algo(data[self.start:self.end])
          if recorded_checksum != actual_checksum:
              raise SuitcaseChecksumException(
                  "recorded checksum %r did not match actual %r.  full data: %r",
                  recorded_checksum, actual_checksum, data)
docs: Raises :class:`SuitcaseChecksumException` if not valid