I have a Base64 encoded file and I am trying the following to decode it:
[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($data))
However it generates the following error:
Exception calling "FromBase64String" with "1" argument(s): "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding
characters, or an illegal character among the padding characters.
Although it is Base64, completely. Any ideas?
*Please note that it is Base64, but not encoded by PowerShell.
\n
characters in it maybe?