I copied the Base64 encoder from Android platform (and converted it to Kotlin) because the Java one exists only since 1.8
(I don't now if I want to curse Java for not supporting Base64 out of the box earlier, or Android for not supporting a recent Java API)