Skip to content

Instantly share code, notes, and snippets.

@jgeraerts
Created June 20, 2013 18:30
Show Gist options
  • Save jgeraerts/5825319 to your computer and use it in GitHub Desktop.
Save jgeraerts/5825319 to your computer and use it in GitHub Desktop.
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