-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should support any buffer objects, not just bytes #707
Comments
Yes, this library predates |
I couldn't find any way to use pynacl to encrypt large files as all the public API takes is |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: