The input range to decode.
The buffer to store decoded result.
The slice of buffer containing the decoded result.
Base64Exception if source contains characters outside the base alphabet of the current Base64 encoding scheme.
auto encoded = "Gis8TV1u"; ubyte[32] buffer; // much bigger than necessary // Just to be sure... auto decodedLength = Base64.decodeLength(encoded.length); assert(buffer.length >= decodedLength); // decode() returns a slice of the given buffer. auto decoded = Base64.decode(encoded, buffer[]); assert(decoded is buffer[0 .. decodedLength]); assert(decoded == [0x1a, 0x2b, 0x3c, 0x4d, 0x5d, 0x6e]);
Decodes source into the given buffer.