function StringToUint8Array(str) {
	    const arr = new Uint8Array(str.length + 1);
	    for (let i = 0; i < str.length; ++i) {
	        arr[i] = str.charCodeAt(i);
	    }
	    arr[str.length] = 0;
	    return arr;
	}
Convert string to Uint8array.
@param str The string.
@returns The corresponding Uint8Array.