Skip to content

Finding the names of files in the Old School RuneScape cache

License

Notifications You must be signed in to change notification settings

Joshua-F/cache-names

 
 

Repository files navigation

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

About

Finding the names of files in the Old School RuneScape cache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%