base64 encoding .txt file

i would like to hear what mistakes i have made.

You need to go all the way back to the basics, and learn the difference between integers and floats. 60.0 is NOT in int value.