guava
guava copied to clipboard
A way to get a HashFunction backed by a MessageDigest algorithm
Another way to satisfy #3960
Is MessageDigest the same as MD5 algo?
MessageDigest includes, but is not limited to, MD5.

Among these, which MD algo do we have to back HashFunction with? and which one are we currently using?
HashFunction is an interface with many implementations, including those three (Hashing.md5(), Hashing.sha1(), Hashing.sha256()). Those three are backed by MessageDigest; the others are not.
The point is that we don't expose a utility in general to allow any MessageDigest algorithm to be used as a HashFunction.
HashFunction is an interface with many implementations, including those three (Hashing.md5(), Hashing.sha1(), Hashing.sha256()). Those three are backed by MessageDigest; the others are not.
So now do we have to back the other ones as well according to the issue raised?
No, there's no plan to change other implementations of HashFunction. This issue is just about whether or not we should expose a way to make a HashFunction from any MessageDigest.
Okay! Got it. Thank you :)
@cpovirk Is there any documentation as to what label P3 means?
hello! Is the decision to add new API method(s) to Hashing, to support creating a HashFunction from any MessageDigest algorithm taken? Would there be a design process?