I have an interesting problem. I'm working on a Perl script that takes in a variety of strings, some base64 encoded, others not.
This data structure is dynamic, generated from a input from third party application. I don't have a ready way to know in advance which of these fields are base64 encoded and those which are not.
The various solutions I have looked at all involved regular expressions on the input data. Unfortunately these all fail if the data is of the same strictly alphanumeric structure.
How can I determine which strings are truly base64 encoded?