aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils
diff options
context:
space:
mode:
authoragorodilov <agorodilov@yandex-team.ru>2022-02-10 16:47:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:09 +0300
commit7a4979e6211c3e78c7f9041d4a9e5d3405343c36 (patch)
tree9e9943579e5a14679af7cd2cda3c36d8c0b775d3 /library/cpp/string_utils
parent676340c42e269f3070f194d160f42a83a10568d4 (diff)
downloadydb-7a4979e6211c3e78c7f9041d4a9e5d3405343c36.tar.gz
Restoring authorship annotation for <agorodilov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils')
-rw-r--r--library/cpp/string_utils/base64/base64.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/string_utils/base64/base64.cpp b/library/cpp/string_utils/base64/base64.cpp
index 05c201f0de..154da5d1f6 100644
--- a/library/cpp/string_utils/base64/base64.cpp
+++ b/library/cpp/string_utils/base64/base64.cpp
@@ -92,9 +92,9 @@ static const char base64_bkw[] = {
static_assert(Y_ARRAY_SIZE(base64_bkw) == 256, "wrong size");
-// Base64 for url encoding, RFC3548
+// Base64 for url encoding, RFC3548
static const char base64_etab_url[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
-
+
static inline unsigned char GetBase64EncodedIndex0(unsigned char octet0) {
return (octet0 >> 2);
}
@@ -115,7 +115,7 @@ template <bool urlVersion>
static inline char* Base64EncodeImpl(char* outstr, const unsigned char* instr, size_t len) {
const char* const base64_etab = (urlVersion ? base64_etab_url : base64_etab_std);
const char pad = (urlVersion ? ',' : '=');
-
+
size_t idx = 0;
while (idx + 2 < len) {
@@ -140,15 +140,15 @@ static inline char* Base64EncodeImpl(char* outstr, const unsigned char* instr, s
return outstr;
}
-
+
static char* Base64EncodePlain(char* outstr, const unsigned char* instr, size_t len) {
return Base64EncodeImpl<false>(outstr, instr, len);
-}
-
+}
+
char* Base64EncodeUrl(char* outstr, const unsigned char* instr, size_t len) {
return Base64EncodeImpl<true>(outstr, instr, len);
-}
-
+}
+
inline void uudecode_1(char* dst, unsigned char* src) {
dst[0] = char((base64_bkw[src[0]] << 2) | (base64_bkw[src[1]] >> 4));
dst[1] = char((base64_bkw[src[1]] << 4) | (base64_bkw[src[2]] >> 2));