You could try to use the R package “base64enc” in oder to work with base64 files:
Also there is a dedictaed base64 en and decoder in the Palladian package: