Hashing API

Here is the Hashing API I have written as part of my GSoC project. PreferredAlgorithms includes all my benchmarks except for Signatures as that requires my SigType enum. Benchmarks are based off of what I found that was already in the codebase. 
@bertm you're wrong. The length check is actually critical. 

I'd use MessageDigest.isEqual() line 163 and get rid of the rest