1

I have been googling (and SO-ing) for a while but haven't come across a single article/answer pointing me at the right Java class to extract a MD5 hash from a file and convert it to armored ascii.

It seems impossible to me that such a thing doesn't exist.

Please note that what I mean is something such as MessageDigest.getInstance("MD5").fromFile("C:\My\Path\file.txt").digest().toBase64(); or something to this effect.

What am I missing?

Andrea Raimondi
  • 527
  • 8
  • 30
  • I disagree that this is a duplicate. What I am asking is something very specific: I don't want to compute a digest from a stream, I want a single, unambiguous line that will do everything for me. I know I can read till the end of the file with != -1 and I am done, but that's not what I want: all I want is one call that does everything just as in the example. – Andrea Raimondi Apr 10 '19 at 04:34

0 Answers0