On Windows (ewww…), here is how to base-64 encode a file:

[convert]::ToBase64String((Get-Content -path "FILE_PATH" -Encoding bytes)) > BASE64_FILE.txt

UNIX is so much simpler, but sometimes you don’t have a choice…