encode

encodes data and returns as an ASCII base32 string.

  1. char[] encode(ubyte[] data, char[] buff, bool pad)
    char[]
    encode
    (
    ubyte[] data
    ,
    char[] buff
    ,
    bool pad = true
    )
  2. char[] encode(ubyte[] data, bool pad)

Parameters

data ubyte[]

what is to be encoded

buff char[]

buffer large enough to hold encoded data

pad bool

Whether to pad ascii output with '='-chars

Examples

char[512] encodebuf;
char[] myEncodedString = encode(cast(ubyte[])"Hello, how are you today?", encodebuf);
Stdout(myEncodedString).newline; // JBSWY3DPFQQGQ33XEBQXEZJAPFXXKIDUN5SGC6J7

Meta