I have a string from an
XML file that I need to
base64 decode.However, it looks like there are some invalid characters within the string.
I tried writing some code to remove any invalid characters, and then re-pad but it appears that my source data may have some invalid invisible characters within it.
So, I figured the best approach since I know the valid base64 characters is to just have a function to extract all the valid characters, that way every invalid character would be purged.
Is there an quick way to test this theory?
My other question was about base64 itself,after researching it appears that while
A-Z,a-z,0-9 are 62 of the valid base64 characters the rest can depend on file encoding.
Is it possible my file is using some other base64 scheme?
When I scanned my file on top of the common
A-Z,a-z,0-9 I have found
='s within the files, not just as padding. I tried removing those and repadding, but I still seem to have invalid characters.
This is now more a general question since I am unable to post my base64 encoded string.
Updated questionThis update is about the first part of my original question,
If I have a string of say 1000 random character, and I want to remove every character that is not in a set. Say my set is "A","B",C","D",E","F","G". What would be the easiest (and fast, no loops) way to remove all characters which are not in the set?
Hi I have data and a key (both strings). The data needs to be encode using the key using Base64. Can some one give me a sample code.
I am working with the Facebook API and Ruby on Rails and I'm trying to parse the JSON that comes back. The problem I'm running into is that Facebook base64URL encodes their data. There is no built-in base64URL decode for Ruby.
For the difference between a base64 encoded and base64URL encoded, see wikipedia.
How do I decode this using Ruby/Rails?
Because some people have difficulty reading - base64 URL is DIFFERENT than base64
I have an encoded PDF in base64.
Dim pdf As String = ""pdf = x.SIOrderPDF(apiKey, UserHash, tablicaZlecen, "pl").pdf 'this method returns a string pdf encoded in base64
Here is my question, how to decode it?
This question is an exact duplicate of:
So I would like to replace every A in the base64 to ].
Here is my code
Would I add string.Replace("A", "]") or something like it somewhere in this class?