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

Function to_bytes

python/downloadprovider.py:35–40  ·  view source on GitHub ↗
(field)

Source from the content-addressed store, hash-verified

33
34
35def to_bytes(field):
36 if type(field) == bytes:
37 return field
38 if type(field) == str:
39 return field.encode()
40 return str(field).encode()
41
42
43class DownloadInstance(object):

Callers 1

requestMethod · 0.70

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected