Decodes an ASCCI base64 string and returns it as ubyte[] data.
This decoder will ignore non-base64 characters, so for example data with
newline in it is valid.
Note that the entries in the provided decode table are not required to be
unique. This allows the use of decode tables with alternatives for certain
characters.
Since the padding is required only between multiple base64 strings (for the
decoder not to interpret the start of the next string as the end of the
previous one), data may or may not contain the trailing padding, and it will
still be decoded correctly.
ubyte[512] decodebuf;
mstringmyDecodedString = cast(mstring)decode("SGVsbG8sIGhvdyBhcmUgeW91IHRvZGF5Pw==", decodebuf);
Stdout(myDecodedString).newline; // Hello, how are you today?
Decodes an ASCCI base64 string and returns it as ubyte[] data.
This decoder will ignore non-base64 characters, so for example data with newline in it is valid. Note that the entries in the provided decode table are not required to be unique. This allows the use of decode tables with alternatives for certain characters.
Since the padding is required only between multiple base64 strings (for the decoder not to interpret the start of the next string as the end of the previous one), data may or may not contain the trailing padding, and it will still be decoded correctly.