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:
Pieter Wuille
2022-04-04 13:19:49 -04:00
committed by MacroFake
parent a4377a0843
commit a65931e3ce
13 changed files with 31 additions and 30 deletions

View File

@@ -70,7 +70,7 @@ static Binary DecodeI2PBase64(const std::string& i2p_b64)
{
const std::string& std_b64 = SwapBase64(i2p_b64);
bool invalid;
Binary decoded = DecodeBase64(std_b64.c_str(), &invalid);
Binary decoded = DecodeBase64(std_b64, &invalid);
if (invalid) {
throw std::runtime_error(strprintf("Cannot decode Base64: \"%s\"", i2p_b64));
}