Stole some code, trying a different attempt at decoding base64 to bufferarray.