Split base64 encoding according to Moodle requirements.