| ... | @@ -7760,27 +7760,6 @@ static void base64_encode(Slice<uint8_t> dest, Slice<uint8_t> source) { | ... | @@ -7760,27 +7760,6 @@ static void base64_encode(Slice<uint8_t> dest, Slice<uint8_t> source) { |
| 7760 | | 7760 | |
| 7761 | // Assert that we never need pad characters. | 7761 | // Assert that we never need pad characters. |
| 7762 | assert(i == source.len); | 7762 | assert(i == source.len); |
| 7763 | //if (i < source.len) { | | |
| 7764 | // dest.ptr[out_index] = base64_fs_alphabet[(source.ptr[i] >> 2) & 0x3f]; | | |
| 7765 | // out_index += 1; | | |
| 7766 | | | |
| 7767 | // if (i + 1 == source.len) { | | |
| 7768 | // dest.ptr[out_index] = base64_fs_alphabet[(source.ptr[i] & 0x3) << 4]; | | |
| 7769 | // out_index += 1; | | |
| 7770 | | | |
| 7771 | // dest.ptr[out_index] = encoder.pad_char; | | |
| 7772 | // out_index += 1; | | |
| 7773 | // } else { | | |
| 7774 | // dest.ptr[out_index] = base64_fs_alphabet[((source.ptr[i] & 0x3) << 4) | ((source.ptr[i + 1] & 0xf0) >> 4)]; | | |
| 7775 | // out_index += 1; | | |
| 7776 | | | |
| 7777 | // dest.ptr[out_index] = base64_fs_alphabet[(source.ptr[i + 1] & 0xf) << 2]; | | |
| 7778 | // out_index += 1; | | |
| 7779 | // } | | |
| 7780 | | | |
| 7781 | // dest.ptr[out_index] = encoder.pad_char; | | |
| 7782 | // out_index += 1; | | |
| 7783 | //} | | |
| 7784 | } | 7763 | } |
| 7785 | | 7764 | |
| 7786 | // Called before init() | 7765 | // Called before init() |