MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / decode

Method decode

python/transform.py:239–253  ·  view source on GitHub ↗
(self, input_buf, params={})

Source from the content-addressed store, hash-verified

237 return None
238
239 def decode(self, input_buf, params={}):
240 if isinstance(input_buf, int) or isinstance(input_buf, int):
241 return None
242 input_buf = databuffer.DataBuffer(input_buf)
243 output_buf = databuffer.DataBuffer()
244 keys = list(params.keys())
245 param_buf = (core.BNTransformParameter * len(keys))()
246 data = []
247 for i in range(0, len(keys)):
248 data.append(databuffer.DataBuffer(params[keys[i]]))
249 param_buf[i].name = keys[i]
250 param_buf[i].value = data[i].handle
251 if not core.BNDecode(self.handle, input_buf.handle, output_buf.handle, param_buf, len(keys)):
252 return None
253 return bytes(output_buf)
254
255 def encode(self, input_buf, params={}):
256 if isinstance(input_buf, int) or isinstance(input_buf, int):

Callers 15

valueMethod · 0.45
_build_symbol_cacheMethod · 0.45
parse_type_stringMethod · 0.45
parse_expressionMethod · 0.45
writeMethod · 0.45
_value_helperMethod · 0.45
activity_rootsMethod · 0.45
subactivitiesMethod · 0.45

Calls 3

DataBufferMethod · 0.80
keysMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected