We have two sets of Base64 encoding/decoding functions, some in Spanner:
|
StatusOr<spanner::Bytes> BytesFromBase64(std::string input); |
|
std::string BytesToBase64(spanner::Bytes b); |
and some in Storage:
|
/** |
|
* Decodes a Base64-encoded string. |
|
*/ |
|
std::vector<std::uint8_t> Base64Decode(std::string const& str); |
|
|
|
/** |
|
* Encodes a string using Base64. |
|
*/ |
|
std::string Base64Encode(std::string const& str); |
We should refactor the implementation in spanner to google/cloud/internal and use those in the storage library. Using OpenSSL for this is too complicated, and requires error handling for the OpenSSL abstractions.
I think this will remove some of the exceptions mentioned in #6933
We have two sets of Base64 encoding/decoding functions, some in Spanner:
google-cloud-cpp/google/cloud/spanner/bytes.h
Lines 159 to 160 in 569e1dc
and some in Storage:
google-cloud-cpp/google/cloud/storage/internal/openssl_util.h
Lines 31 to 39 in 569e1dc
We should refactor the implementation in spanner to
google/cloud/internaland use those in the storage library. Using OpenSSL for this is too complicated, and requires error handling for the OpenSSL abstractions.I think this will remove some of the exceptions mentioned in #6933