StringHash: note about implementation added

GitOrigin-RevId: 918b121afbd0d0acf666dce0158f37f805f18fbc
This commit is contained in:
Tagir Valeev
2019-11-07 02:40:58 +00:00
committed by intellij-monorepo-bot
parent 0bdcc75440
commit e9153d5b68
@@ -128,7 +128,8 @@ public class StringHash {
}
/**
* Calculates hash value of string
* Calculates hash value of string using buzhash algorithm.
* See http://www.serve.net/buz/hash.adt/java.008.html for details.
*
* @param arg string to calculate hash value upon
* @return calculated hash value
@@ -142,6 +143,13 @@ public class StringHash {
return h;
}
/**
* Calculates hash value of byte array buzhash algorithm.
* See http://www.serve.net/buz/hash.adt/java.008.html for details.
*
* @param arg byte arrayg to calculate hash value upon
* @return calculated hash value
*/
public static long calc(byte[] arg) {
if (arg == null) return 0;
long h = initialHash;