Update to v16.1 documentation and ODK library
This commit is contained in:
@@ -87,10 +87,12 @@ std::string a2bs_hex(const std::string& byte) {
|
||||
}
|
||||
|
||||
std::string b2a_hex(const std::vector<uint8_t>& byte) {
|
||||
return HexEncode(&byte[0], byte.size());
|
||||
if (byte.empty()) return "";
|
||||
return HexEncode(byte.data(), byte.size());
|
||||
}
|
||||
|
||||
std::string b2a_hex(const std::string& byte) {
|
||||
if (byte.empty()) return "";
|
||||
return HexEncode(reinterpret_cast<const uint8_t*>(byte.data()),
|
||||
byte.length());
|
||||
}
|
||||
@@ -251,7 +253,7 @@ std::vector<uint8_t> Base64SafeDecode(const std::string& b64_input) {
|
||||
|
||||
std::string HexEncode(const uint8_t* in_buffer, unsigned int size) {
|
||||
static const char kHexChars[] = "0123456789ABCDEF";
|
||||
|
||||
if (size == 0) return "";
|
||||
// Each input byte creates two output hex characters.
|
||||
std::string out_buffer(size * 2, '\0');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user