tlsh
tlsh copied to clipboard
Python bindings: please support Python's buffer protocol
When passing a Python bytearray to hashing function the following error is thrown:
TypeError: argument 1 must be read-only bytes-like object, not bytearray
and it prevents me from using bytearrays.
bytearrays offer advantages so it might be worth supporting:
https://eli.thegreenplace.net/2011/11/28/less-copies-in-python-with-the-buffer-protocol-and-memoryviews