I was recently looking at converting an old application from VB6 to Java that used MD5 in its output files
as hashes for validation.
The first thing I did was to make a java class that read in the file and checked the hashes, I tried it on a
few files and it worked fine, then I found a file that it failed on.
Now, this app wrote all the files using the exact same function, so it seemed odd that 1 of them wouldn’t
parse and the rest would.
When I looked at the file closer, I found that this one contained some symbols in the output that the others
didn’t - I eventually figured out that the symbol that was causing the problem was the pound sign (£).
Without going into too much detail, this presented a major problem, the string in question was used as part
of the password validation for the app (the output files are encrypted using the password as a key), and the
java code was getting different results than the old VB6 code, and was unable to decode the file as a
So, this sparked my curiosity a bit, the VB6 code I was using wasn’t a built in, it was code I’d gotten
elsewhere and used, so I assumed it was faulty code (not that this helped me much, as I needed to get the exact
same output, but ignoring that).