aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/base64/base64.cpp
diff options
context:
space:
mode:
authorstanly <stanly@yandex-team.ru>2022-02-10 16:46:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:49 +0300
commitcde218e65dfef5ce03a48d641fd8f7913cf17b2d (patch)
treed3349caea4095825a55b5ba24fe758067b29ce6f /library/cpp/string_utils/base64/base64.cpp
parent9f813499b4ef585cb3c2bb93de93ef003daf4fc4 (diff)
downloadydb-cde218e65dfef5ce03a48d641fd8f7913cf17b2d.tar.gz
Restoring authorship annotation for <stanly@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/base64/base64.cpp')
-rw-r--r--library/cpp/string_utils/base64/base64.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/string_utils/base64/base64.cpp b/library/cpp/string_utils/base64/base64.cpp
index 05c201f0de..92060ad00f 100644
--- a/library/cpp/string_utils/base64/base64.cpp
+++ b/library/cpp/string_utils/base64/base64.cpp
@@ -246,14 +246,14 @@ size_t Base64Decode(void* dst, const char* b, const char* e) {
}
TString Base64DecodeUneven(const TStringBuf s) {
- if (s.length() % 4 == 0) {
- return Base64Decode(s);
- }
-
- // padding to 4
+ if (s.length() % 4 == 0) {
+ return Base64Decode(s);
+ }
+
+ // padding to 4
return Base64Decode(TString(s) + TString(4 - (s.length() % 4), '='));
-}
-
+}
+
char* Base64Encode(char* outstr, const unsigned char* instr, size_t len) {
static const TImpl IMPL = GetImpl();
if (Y_LIKELY(len < 8)) {