Set type to byte for base64 encode