HomePhabricator

Add pf_invalid arg to std::string DecodeBase{32,64}

Description

Add pf_invalid arg to std::string DecodeBase{32,64}

Summary:

Add support for the optional "pf_invalid" out parameter (which allows
the caller to detect decoding failures) to the std::string versions of
DecodeBase32 and DecodeBase64. The char* versions already have this
feature.

Also, rename all uses of pfInvalid to pf_invalid to match style
guidelines.

Partial backport of core PR14978:
https://github.com/bitcoin/bitcoin/pull/14978/commits/162ffefd2f562169725559906601c25c579aa91c

Depends on D5735.

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
Glenn Willen <gwillen@nerdnet.org>Authored on Jan 29 2019, 06:44
FabienCommitted on Apr 16 2020, 13:28
nakihitoPushed on Apr 16 2020, 19:29
Reviewer
Restricted Project
Differential Revision
D5736: Add pf_invalid arg to std::string DecodeBase{32,64}
Parents
rSTAGING9fa8a6f08ee9: Simplify Base32 and Base64 conversions
Branches
Unknown
Tags
Unknown