I have some Base64 encoded data as a byte array that I’m trying to convert back to it’s original format.
The data is reaches my function encoded twice over. What I want to achieve is something like:
string encoded = "some base 64 string";
byte [] data = System.Convert.FromBase64String(System.Convert.FromBase64String(encoded));
The statement above is wrong of course as I could not figure out which combination of functions to use and ran into unicode issues when I tried. Any pointers would be appreciated.
If I understand your problem right, you’re trying to do this:
In that case, your statement would look something like this: