tlsh icon indicating copy to clipboard operation
tlsh copied to clipboard

Python bindings: please support Python's buffer protocol

Open armijnhemel opened this issue 6 years ago • 0 comments

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

armijnhemel avatar Dec 09 '18 21:12 armijnhemel