-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A way to get a HashFunction backed by a MessageDigest algorithm #5990
Comments
Is MessageDigest the same as MD5 algo? |
MessageDigest includes, but is not limited to, MD5. |
|
The point is that we don't expose a utility in general to allow any |
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 |
Okay! Got it. |
@cpovirk Is there any documentation as to what label P3 means? |
hello! Is the decision to add new API method(s) to |
Just FTR for anyone else looking for this in the future, perhaps this analysis could be useful background: I've poked around this space while wondering whether to add support for more hash functions here e.g. for this (related to the
I ultimately concluded that, at least for my current application, there was really no need for wanting or needing to do this... but YMMV, of course. It probably boils down to whether you (externally) "have" to support certain hash functions, or whether your application can "choose" which one it wants to support. In the former case, it could be "handy" to implement was this FR suggests. But in the latter (and my) case, I've opted to not support SHA-224, SHA-384, SHA-512/224, SHA-512/256 and stick to SHA-256 & SHA-512, only. (BTW all those are sometimes called SHA-2 sha2-224, sha2-384, sha2-512-224, sha2-512-256 elsewhere; it took at least me a while to dig this!) As for SHA3-* (and #3960), after reading "sha3 not being a very good choice" here, and noticing https://developers.google.com/tink/protect-data-from-tampering#java (currently) "recommend[ing] the HMAC_SHA256" (=sha2-256), I didn't see any interest in supporting that either by writing a custom Guava Just recording this here in case it could be of interest to other Guava users who are investigating how to add more JDK |
Another way to satisfy #3960
The text was updated successfully, but these errors were encountered: