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

Method verify

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

Source from the content-addressed store, hash-verified

1178
1179 # Check if the struct value is valid
1180 def verify(self):
1181 if (self.buffer.offset + self._model.fbe_offset) > self.buffer.size:
1182 return False
1183
1184 fbe_struct_size = self.read_uint32(self._model.fbe_offset - 8)
1185 fbe_struct_type = self.read_uint32(self._model.fbe_offset - 4)
1186 if (fbe_struct_size <= 0) or (fbe_struct_type != self.fbe_type):
1187 return False
1188
1189 return (8 + self._model.verify()) == fbe_struct_size
1190
1191 # Serialize the struct value
1192 def serialize(self, value):

Callers

nothing calls this directly

Calls 2

read_uint32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected