public static uint Unsigned(Stream stream) { uint num = 1337; uint num1 = 0; uint length = 0; using (BinaryReader binaryReader = new BinaryReader(stream)) { for (byte[] i = binaryReader.ReadBytes(4); i.Length != 0; i = binaryReader.ReadBytes(4)) { length += (int)i.Length; switch ((int)i.Length) { case 1: { num1 = i[0]; num1 = MurmurHash.rot(num1 * -862048943, 15); num = num ^ num1 * 461845907; break; } case 2: { num1 = (uint)(i[0] | i[1] << 8); num1 = MurmurHash.rot(num1 * -862048943, 15); num = num ^ num1 * 461845907; break; } case 3: { num1 = (uint)(i[0] | i[1] << 8 | i[2] << 16); num1 = MurmurHash.rot(num1 * -862048943, 15); num = num ^ num1 * 461845907; break; } case 4: { num1 = (uint)(i[0] | i[1] << 8 | i[2] << 16 | i[3] << 24); num1 = MurmurHash.rot(num1 * -862048943, 15); num = num ^ num1 * 461845907; num = MurmurHash.rot(num, 13); num = num * 5 + -430675100; break; } } } } num ^= length; num = MurmurHash.mix(num); return(num); }
public static uint Unsigned(Stream stream) { uint x = 1337; uint num1 = 0; using (BinaryReader binaryReader = new BinaryReader(stream)) { for (byte[] numArray = binaryReader.ReadBytes(4); numArray.Length != 0; numArray = binaryReader.ReadBytes(4)) { num1 += (uint)numArray.Length; switch (numArray.Length) { case 1: uint num2 = MurmurHash.rot((uint)numArray[0] * 3432918353U, (byte)15) * 461845907U; x ^= num2; break; case 2: uint num3 = MurmurHash.rot(((uint)numArray[0] | (uint)numArray[1] << 8) * 3432918353U, (byte)15) * 461845907U; x ^= num3; break; case 3: uint num4 = MurmurHash.rot((uint)((int)numArray[0] | (int)numArray[1] << 8 | (int)numArray[2] << 16) * 3432918353U, (byte)15) * 461845907U; x ^= num4; break; case 4: uint num5 = MurmurHash.rot((uint)((int)numArray[0] | (int)numArray[1] << 8 | (int)numArray[2] << 16 | (int)numArray[3] << 24) * 3432918353U, (byte)15) * 461845907U; x ^= num5; x = MurmurHash.rot(x, (byte)13); x = (uint)((int)x * 5 - 430675100); break; } } } return(MurmurHash.mix(x ^ num1)); }