encode

encodes data and returns as an ASCII base32 string.

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

Parameters

data ubyte[]

what is to be encoded

pad bool

whether to pad output with '='-chars

Examples

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

Meta