First stab at the base64_encode function

Also switching it to use the bytes struct