### Java Hash Function for OSRS Cache Names Source: https://github.com/runestar/cache-names/blob/master/README.md This Java function calculates a hash for strings, specifically used for Old School RuneScape cache file names. It converts the string to lowercase, then to bytes using 'windows-1252' encoding, and applies a polynomial rolling hash. It is equivalent to `s.toLowerCase(Locale.ROOT).hashCode()` for ASCII-only inputs. ```java public static int hash(String s) { byte[] bytes = s.toLowerCase(Locale.ROOT).getBytes(Charset.forName("windows-1252")); int h = 0; for (byte b : bytes) { h = h * 31 + b; } return h; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.