encode

encodes data and returns as an ASCII base64 string.

  1. char[] encode(const(ubyte[]) data, char[] buff)
  2. char[] encode(const(ubyte[]) data)
    char[]
    encode
    (
    const(ubyte[]) data
    )

Parameters

data const(ubyte[])

what is to be encoded

Examples

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

Meta