Skip to content

Commit

Permalink
fix: fix incorrect base64 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnL4 committed Oct 15, 2024
1 parent 2635a74 commit 7b52b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/utils/el_base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void el_base64_encode(const unsigned char* in, int in_len, char* out) {
char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
char_array_4[3] = char_array_3[2] & 0x3f;

for (j = 0; j < i + 1; j++) *out++ = constants::BASE64_CHARS_TABLE[char_array_4[i]];
for (j = 0; j < i + 1; j++) *out++ = constants::BASE64_CHARS_TABLE[char_array_4[j]];

while (i++ < 3) *out++ = '=';
}
Expand Down

0 comments on commit 7b52b92

Please sign in to comment.