-
Deprecated MethodsMethodDescriptionThis returns
Object.hashCode(); you almost certainly mean to callhash().asInt().If you must interoperate with a system that requires MD5, then use this method, despite its deprecation. But if you can choose your hash function, avoid MD5, which is neither fast nor secure. As of January 2017, we suggest:- For security:
sha256()or a higher-level API. - For speed:
goodFastHash(int), though see its docs for caveats.
This implementation produces incorrect hash values from theHashFunction.hashString(java.lang.CharSequence, java.nio.charset.Charset)method if the string contains non-BMP characters. Usemurmur3_32_fixed()instead.This implementation produces incorrect hash values from theHashFunction.hashString(java.lang.CharSequence, java.nio.charset.Charset)method if the string contains non-BMP characters. Usemurmur3_32_fixed(int)instead.If you must interoperate with a system that requires SHA-1, then use this method, despite its deprecation. But if you can choose your hash function, avoid SHA-1, which is neither fast nor secure. As of January 2017, we suggest:- For security:
sha256()or a higher-level API. - For speed:
goodFastHash(int), though see its docs for caveats.
- For security:
Predicateinterface; useBloomFilter.mightContain(T)instead.