Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Sep 8, 2019
Sep 2, 2018
Sep 17, 2020
Aug 24, 2020

README.md

cache-names Discord

View all

Some files in the Old School RuneScape cache contain a hash of their name. The only way to find out the names of these files is to reverse the hashes.

The following hash function is used:

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;
}

It is equivalent to s.toLowerCase(Locale.ROOT).hashCode() for ASCII-only inputs

You can’t perform that action at this time.