Hello @thomaso34696569
try below red text.
var memBuff = new MemoryBuffer();
memBuff.fromString('dummy text');
var textBase64 = memBuff.toBase64();
logInfo(textBase64);
var memBuff2 = new MemoryBuffer();
memBuff2.appendBase64(textBase64);
var text = memBuff2.toString();
logInfo(text);
memBuff.dispose();
memBuff2.dispose();