calculates and returns the size needed to encode the length of the array passed.
calculates and returns the size needed to encode the length passed.
decodes an ASCII base32 string and returns it as ubyte[] data.
decodes an ASCII base32 string and returns it as ubyte[] data. Pre-allocates the size of the array.
encodes data and returns as an ASCII base32 string.
encodes data and returns as an ASCII base32 string.
char[] blah = "Hello there, my name is Jeff."; scope encodebuf = new char[allocateEncodeSize(cast(ubyte[])blah)]; char[] encoded = encode(cast(ubyte[])blah, encodebuf); scope decodebuf = new ubyte[encoded.length]; if (cast(char[])decode(encoded, decodebuf) == "Hello there, my name is Jeff.") Stdout("yay").newline;
Since v1.0
This module is used to decode and encode base32 char[] arrays.