botan icon indicating copy to clipboard operation
botan copied to clipboard

FIX: botan_cipher_get_update_granularity()

Open reneme opened this issue 1 year ago • 1 comments

With #3951 botan_cipher_update() gained a documented way to communicate the required buffer size to finalize certain cipher modes if not enough bytes were provided by the caller. I feel that this actually obsoletes the internal helper function ffi_choose_update_size() altogether. Instead, I suggest to just pass through what the Cipher_Mode object reports.

Note that this might harm performance for users that currently use botan_cipher_get_update_granularity() (similarly to #3925). Such users should switch to botan_cipher_get_ideal_update_granularity(), as explained in the Botan 3.0 migration guide.

reneme avatar Jun 03 '24 10:06 reneme

Coverage Status

coverage: 91.822% (-0.002%) from 91.824% when pulling efd9e69fcac3b6eed08b56ec2ef8a4406248073e on Rohde-Schwarz:fix/update_granularity into 5649a10ec3399d28c8b84ae18fd65fce57bd7bca on randombit:master.

coveralls avatar Jun 03 '24 10:06 coveralls

Closing as obsolete after #4122 got merged. We might bring this back with 4.0 as a new API.

reneme avatar Jul 04 '24 13:07 reneme