chiark / gitweb /
util-lib,tests: rework unbase64 so that we skip over whitespace automatically (#7522)
authorLennart Poettering <lennart@poettering.net>
Sun, 3 Dec 2017 19:57:24 +0000 (20:57 +0100)
committerSven Eden <yamakuzure@gmx.net>
Sun, 3 Dec 2017 19:57:24 +0000 (20:57 +0100)
commit7fbf3c6403dc2d2e9930ad7cfb11484a047066b5
treeade2b6afe67f94bd38a5e24ae9963508aa7aa703
parent1d55768e17132cf464a2b36c6e6edd04632fc3ca
util-lib,tests: rework unbase64 so that we skip over whitespace automatically (#7522)

Let's optimize things a bit, and instead of having to strip whitespace
first before decoding base64, let's do that implicitly while doing so.
Given that base64 was designed the way it was designed specifically to
be tolerant to whitespace changes, it's a good idea to do this
automatically and implicitly.
src/basic/hexdecoct.c
src/test/test-hexdecoct.c