base64 encoding .txt file

What is that mess with sk, u, i, and floor(u) supposed to be doing?

int i = 60.0;

Does this look reasonable to you?