]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: basenc: refactor all encodings to use finalize
authorPádraig Brady <P@draigBrady.com>
Mon, 8 Sep 2025 16:40:00 +0000 (17:40 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 10 Sep 2025 22:24:46 +0000 (23:24 +0100)
commit4141ae3e4970dbc206b56366b0581f04fa87dfc1
tree075a842ecb30ddec3c0c96fe0bc8ba0a272a1bcc
parent1ba065b5beceb9461876b06cc906f78363e1d832
maint: basenc: refactor all encodings to use finalize

Finalize was required for base58, but it's a more general mechanism
which simplifies the logic for all encodings

* src/basenc.c (do_decode): Always call base_decode_ctx_finalize(),
rather than the awkward double loop at end of buffer.
* tests/basenc/basenc.pl: Add basenc finalization tests.
src/basenc.c
tests/basenc/basenc.pl