Closed Keruspe closed 2 years ago
In general, it should be enough to have one block of reserve space.
I plan to restore the allocating methods in the next cipher
release. I wanted to somehow avoid zeroizing allocated output buffers, but, unfortunately, I couldn't find a simple sound solution.
With cipher 0.3 and block-modes 0.8, there used to be some
encrypt_vec
method which would allocate just enough room for the encrypted data + padding. Having a helper to calculate this size (or restoring some encrypt_padded_vec, and maybe decrypt_padded_vec too, or something like that) would be really helpful.