Export of internal Abseil changes.
-- 86b1c997fac1f77b0eacfab788659b5a89a6096e by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 211654320 -- 299b70e1247df768454a76eb957a184de9706f61 by Chris Kennelly <ckennelly@google.com>: Avoid creating a misaligned reference to int. PiperOrigin-RevId: 211505883 -- c8fad4357ad0bfb3c5ad197c505509bc087072c9 by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 211458539 -- 0613feffcd36466c3e53a50758d7e8f17c001dce by Greg Falcon <gfalcon@google.com>: Refactor a string unit test into a template function for internal purposes. PiperOrigin-RevId: 211100748 GitOrigin-RevId: 86b1c997fac1f77b0eacfab788659b5a89a6096e Change-Id: Ic6a932b6c27c6762dcdb3b0127f1e2be782418c1
This commit is contained in:
parent
c075ad3216
commit
fb462224c0
7 changed files with 48 additions and 45 deletions
|
|
@ -939,7 +939,8 @@ constexpr char kBase64Chars[] =
|
|||
constexpr char kWebSafeBase64Chars[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
||||
|
||||
void Base64EscapeInternal(const unsigned char* src, size_t szsrc, std::string* dest,
|
||||
template <typename String>
|
||||
void Base64EscapeInternal(const unsigned char* src, size_t szsrc, String* dest,
|
||||
bool do_padding, const char* base64_chars) {
|
||||
const size_t calc_escaped_size =
|
||||
CalculateBase64EscapedLenInternal(szsrc, do_padding);
|
||||
|
|
@ -951,7 +952,8 @@ void Base64EscapeInternal(const unsigned char* src, size_t szsrc, std::string* d
|
|||
dest->erase(escaped_len);
|
||||
}
|
||||
|
||||
bool Base64UnescapeInternal(const char* src, size_t slen, std::string* dest,
|
||||
template <typename String>
|
||||
bool Base64UnescapeInternal(const char* src, size_t slen, String* dest,
|
||||
const signed char* unbase64) {
|
||||
// Determine the size of the output std::string. Base64 encodes every 3 bytes into
|
||||
// 4 characters. any leftover chars are added directly for good measure.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue