You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use ffi.from_buffer(...) for conversions, so that bytearray, memoryview and other things work too, instead of checking that the arguments are bytes instances.
I would also prefer being able to give output buffers to low level functions, for instance I had to do this hack to enable encryption without creating a new buffer. It works even in place, if ciphertext and message are the same buffer:
While for most things it does not matter if copies are made and new buffers are being allocated, stream ciphers can be much faster with proper buffer management.
The text was updated successfully, but these errors were encountered:
Use
ffi.from_buffer(...)
for conversions, so thatbytearray
,memoryview
and other things work too, instead of checking that the arguments arebytes
instances.I would also prefer being able to give output buffers to low level functions, for instance I had to do this hack to enable encryption without creating a new buffer. It works even in place, if
ciphertext
andmessage
are the same buffer:While for most things it does not matter if copies are made and new buffers are being allocated, stream ciphers can be much faster with proper buffer management.
The text was updated successfully, but these errors were encountered: