System.NetEncoding.Base64.Encode is wrong
## Summary <!-- Summarize the bug encountered concisely --> System.NetEncoding.Base64.Encode is wrong ## System Information <!-- The more information are provided the easier it is to replicate the bug --> - **Operating system:** All<!-- Windows, Linux (if possible, also name the distro), FreeBSD, Android, ... --> - **Processor architecture:** All<!-- x86, x86-64, ARM, AARCH64, AVR, RISC-V, PowerPC, ... --> - **Compiler version:** 3.2.2<!-- 3.2, 3.2.2, 3.3, trunk, beta, ... (if possible, give also the git hash) --> - **Device:** Computer<!-- Computer, Tablet, Mobile, Amiga, Microcontroller, ... --> ## Steps to reproduce <!-- How one can reproduce the issue - this is very important! --> ## Example Project <!-- If possible, please create an example project that exhibits the problematic behavior, and link to it here in the bug report. --> ## What is the current bug behavior? <!-- What actually happens --> In fact, it performs decoding. ## What is the expected (correct) behavior? <!-- What you should see instead --> It should perform coding. ## Relevant logs and/or screenshots <!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise. You can also use syntax highlighting for Pascal with: ```pascal the code``` For more information see https://docs.gitlab.com/ee/user/markdown.html --> ## Possible fixes <!-- If you can, link to the line of code that might be responsible for the problem --> ```pascal function TBase64Encoding.DoEncode(const aInput, aOutput: TStream): Integer; Var S : TBase64EncodingStream; begin S:=TBase64EncodingStream.Create(aInput); try Result:=S.Size; aOutput.CopyFrom(S,Result); finally S.Free; end; end; ```
issue