Reverse engineering base64 variation
I'm dealing with a strange base64 variation. I need to write decoder for it but I've stuck with reverse engineering. It differs not so much from original base64. It looks like there's something with bit padding or smth.
Here are some known encoded strings:
开发者_高级运维- YQ== - a
- YQA= - aa
- YQBh - aaa
- YQBhAA== - aaaa
- YQBhAGE= - aaaaa
- YQBhAGEA - aaaaaa
- YQBhAGEAYQ== - aaaaaaa
- YQBhAGEAYQA= - aaaaaaaa
- YQBhAGEAYQBh - aaaaaaaaa
At the risk of sounding stupid, my bet would be that the encoding above is a buggy implementation that is mixing chars and wchar_ts together.
Using "regular" base64, the string 'YQA=' decodes to 'a\x00' and the 'YQBhAGEAYQA=' decodes to 'a\x00a\x00a\x00a\x00'.
Any chance you could supply a few more examples so we can cancel this theory?
精彩评论