The easy interface doesn't require any memory allocations any more.

At least for crypto_secretbox. crypto_box will follow.
This commit is contained in:
Frank Denis 2014-06-25 20:21:48 -07:00
parent b2a8367b2b
commit 865a0719fc

View File

@ -263,12 +263,8 @@ The length of the ciphertext, which will include the MAC, is
the decrypted message doesn't have to be more than `len(c) - the decrypted message doesn't have to be more than `len(c) -
crypto_secretbox_MACBYTES`. crypto_secretbox_MACBYTES`.
The "easy" interface currently requires allocations and copying, which The "easy" interface is as fast as the traditional NaCl API and
makes it slower than using the traditional NaCl interface. This doesn't require any memory allocations.
shouldn't make any sensible difference in most use cases, and future
versions of the library may not require extra copy operations any
more. Unless speed is absolutely critical, you are welcome to use the
"easy" interface, especially if you are new to NaCl/Sodium.
## New operations ## New operations