MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / verify

Method verify

projects/Python/proto/protoex.py:1717–1726  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1715
1716 # Check if the struct value is valid
1717 def verify(self):
1718 if (self.buffer.offset + self._model.fbe_offset) > self.buffer.size:
1719 return False
1720
1721 fbe_struct_size = self.read_uint32(self._model.fbe_offset - 8)
1722 fbe_struct_type = self.read_uint32(self._model.fbe_offset - 4)
1723 if (fbe_struct_size <= 0) or (fbe_struct_type != self.fbe_type):
1724 return False
1725
1726 return (8 + self._model.verify()) == fbe_struct_size
1727
1728 # Serialize the struct value
1729 def serialize(self, value):

Callers

nothing calls this directly

Calls 2

read_uint32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected