HomePhabricator

Simplify Base32 and Base64 conversions

Description

Simplify Base32 and Base64 conversions

Summary:

Generalize ConvertBits a bit to also be usable for the existing Base32
and Base64 convertions (rather than just for Bech32).

Backport of core PR11630.

Depends on D5734.

The key_io.cpp changes are not ported because they are segwit related,
however some cashaddrenc.cpp and util_tests.cpp changes were required.

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5735

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Nov 23 2017, 01:04
FabienCommitted on Apr 16 2020, 13:25
FabienPushed on Apr 16 2020, 13:25
Reviewer
Restricted Project
Differential Revision
D5735: Simplify Base32 and Base64 conversions
Parents
rABCc8254da60ec2: Allow ConvertBits() to succeed on unpadded zeros
Branches
Unknown
Tags
Unknown