Switch everything to uint8_t and have base64_encode only operate on
bits, using a separate function to convert to a string. This also
removes the space padding.