private static ulong GetStrCode32(string text)
const ulong seed0 = 0x9ae16a3b2f90404f;
byte[] seed1Bytes = new byte[sizeof(ulong)];
for (int i = text.Length - 1, j = 0; i >= 0 && j < sizeof(ulong); i--, j++)
seed1Bytes[j] = Convert.ToByte(text[i]);
ulong seed1 = BitConverter.ToUInt64(seed1Bytes, 0);
ulong maskedHash = CityHash.CityHash.CityHash64WithSeeds(text, seed0, seed1) & 0x3FFFFFFFFFFFF;
public static void Main(string[] args)
string[] names = new string[] {
"/Assets/tpp/item/ewr/Scenes/gog1_main0_def"
const string assets_const = "/Assets/";
foreach (string name in names)
if (name.StartsWith(assets_const))
text = name.Substring(assets_const.Length);
ulong testStrCode32 = GetStrCode32(text);
Console.WriteLine(name + "\t" + testStrCode32.ToString("x"));