Page MenuHomePhabricator

refactor: make EncodeBase{32,64} consume Spans
ClosedPublic

Authored by Fabien on Feb 9 2021, 10:43.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC545de4f0d2c9: refactor: make EncodeBase{32,64} consume Spans
Summary
To simplify the interface of the Base32/Base64 encoding functions for
raw data, this PR changes them from taking two arguments (pointer and
length) to just one Span. Most calls to EncodeBase64 pass data from
CDataStream instances, which unfortunately internally work with char*
pointers rather than unsigned char*, but thanks to the recently
introduced MakeUCharSpan helper, converting them is quite easy.

Backport of core PR19687.

Depends on D9183.

Test Plan
ninja all check-all