mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 04:33:59 +01:00
Make DecodeBase{32,64} always return vector, not string
Base32/base64 are mechanisms for encoding binary data. That they'd decode to a string is just bizarre. The fact that they'd do that based on the type of input arguments even more so.
This commit is contained in:
@@ -20,9 +20,9 @@ BOOST_AUTO_TEST_CASE(base64_testvectors)
|
||||
std::string strEnc = EncodeBase64(vstrIn[i]);
|
||||
BOOST_CHECK_EQUAL(strEnc, vstrOut[i]);
|
||||
bool invalid;
|
||||
std::string strDec = DecodeBase64(strEnc, &invalid);
|
||||
auto dec = DecodeBase64(strEnc, &invalid);
|
||||
BOOST_CHECK(!invalid);
|
||||
BOOST_CHECK_EQUAL(strDec, vstrIn[i]);
|
||||
BOOST_CHECK_MESSAGE(MakeByteSpan(dec) == MakeByteSpan(vstrIn[i]), vstrOut[i]);
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user