List of utility methods to do Hash Code Calculate
int | hashCode(int x, int y, int z, int w) hash Code return hashCode(new int[] { x, y, z, w }); |
int | hashCode(int x, int y, int z, int w, int t) hash Code return hashCode(new int[] { x, y, z, w, t }); |
int | hashCode(int[] array) Hash every element uniformly using the Modified Bernstein hash. if (array == null) { return 0; int h = 1; for (int x : array) { h = ((h << 5) - h) ^ x; return h; ... |
String | hashLocationMessage(String phone, double latitude, double longitude, long time) generate a hash of a location message String mToHash = phone + Double.toString(latitude)
+ Double.toString(longitude) + Long.toString(time);
return createHash(mToHash);
|
String | hashPointOfInterestMessage(String phone, double latitude, double longitude, String title, String description) generate a hash of a point of interest message String mToHash = phone + Double.toString(latitude)
+ Double.toString(longitude) + title + description;
return createHash(mToHash);
|
String | computeWeakHash(String string) compute Weak Hash return String.format(Locale.CHINA, "%08x%08x", string.hashCode(), string.length()); |
String | computeWeakHash(String string) compute Weak Hash return String.format(Locale.US, "%08x%08x", string.hashCode(), string.length()); |
String | getHash(String text) get Hash try { return SHA1(text); } catch (NoSuchAlgorithmException e) { Log.e(LOGTAG, "NoSuchAlgorithmException: " + e.toString(), e); return null; |
int | getHashCode(final Object... pObjects) get Hash Code final int prime = 31; int result = 1; for (int i = 0; i < pObjects.length; i++) { final Object object = pObjects[i]; result = prime * result + ((object == null) ? 0 : object.hashCode()); return result; ... |
int | getHashCode(final byte... pBytes) get Hash Code final int prime = 31; int result = 1; for (int i = 0; i < pBytes.length; i++) { result = prime * result + pBytes[i]; return result; |