How to convert a byte array to a hex string in Java?

From the discussion here, and especially this answer, this is the function I currently use: My own tiny benchmarks (a million bytes a thousand times, 256 bytes 10 million times) showed it to be much faster than any other alternative, about half the time on long arrays. Compared to the answer I took it from, … Read more