Is there a Way to Encode a Entire File .CER to Base64?

I wonder If there is a way to Encode Base64 an entire CER Certificate File.

Cuz EncodeBase64, Only works for Encode a String.
I Tested Reading the File into a TextInputStream, and then EncodeBase64 that TextInputStream.
But I wonder if The result would differ If I encode entire file.



Read file with binary stream class.
Than encode and write back to disk with Another binary stream. Or where is the problem?

Be aware if you are doing cross dev. that Xojo is buggy for using Base64 encoding!