Created
June 20, 2013 18:30
-
-
Save jgeraerts/5825319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FacetValueHash { | |
public static long hash(String input){ | |
try { | |
Adler32 adler32 = new Adler32(); | |
adler32.update(input.getBytes("UTF8")); | |
return adler32.getValue(); | |
} catch (UnsupportedEncodingException e) { | |
throw new NestableRuntimeException(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment