Table of Contents

Class JavaHash

Namespace
Shard.WorldGen.Rng
Assembly
Shard.WorldGen.dll

Java's String.hashCode(), replicated exactly: h = 31*h + c over the UTF-16 code units with 32-bit int overflow. .NET's string.GetHashCode() is randomized per-process and cannot be used — worldgen seeds derive from these hashes (via SeedBox), so they must match the reference generator bit-for-bit.

public static class JavaHash
Inheritance
JavaHash
Inherited Members

Methods

HashCode(string)

public static int HashCode(string value)

Parameters

value string

Returns

int