Base64 encode a file
-
Hello everyone, So I'm trying to write a little proggy that base64 encodes any file. The thing is, most of the pieces of code I've found so far only encode strings (alphanumeric + symbols) and don't include any other chars that would possibly be in other types of files. However, I don't understand why. I understand that to base64 encode a string, all I have to do is read the string 6 bits at a time. But when I attempt to do the same thing with lets say a .doc or .zip file, it never comes out right. Any suggestions?
-
Hello everyone, So I'm trying to write a little proggy that base64 encodes any file. The thing is, most of the pieces of code I've found so far only encode strings (alphanumeric + symbols) and don't include any other chars that would possibly be in other types of files. However, I don't understand why. I understand that to base64 encode a string, all I have to do is read the string 6 bits at a time. But when I attempt to do the same thing with lets say a .doc or .zip file, it never comes out right. Any suggestions?
Look on CodeProject[^] - they often have useful, relevant articles[^].
-
Look on CodeProject[^] - they often have useful, relevant articles[^].