turn/ttorrent — pull request #64 by pwoodworth (2013-09-16 18:31:39+00:00)
Title: Use commons-codec for hex and digest encoding

As per the commons-code homepage, it was designed to do two things: 1) Provide canonical implementations of base-XX encoding (including hex), and 2) Provide convenience methods for working with digests. Both of which ttorrent can take advantage of. Specifically:

1) Torrent#byteArrayToHexString performance using the commons-codec implementation is improved as much or more than 100x.

2) Use of commons-codec digest utility methods allows us to clean up and simplify numerous method signatures by eliminating NoSuchAlgorithmException declarations. These declarations make refactoring more cumbersome, and provide no advantage even on systems where SHA-1 digests aren't available (as the ttorrent codebase is equally inoperative either way in that case).