encode

encodes data and returns as an ASCII base32 string.

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

Parameters

data const(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