/// <summary>Represents the base constructor used by derived classes.</summary> /// <param name="engine">The enumerator value of type <see cref="T:FastHashes.MurmurHashEngine"/> representing the engine category used by the hashing algorithm.</param> /// <param name="seed">The <see cref="T:System.UInt32"/> seed used by the hashing algorithm.</param> /// <exception cref="T:System.ComponentModel.InvalidEnumArgumentException">Thrown when the value of <paramref name="engine">engine</paramref> is undefined.</exception> protected MurmurHashG32(MurmurHashEngine engine, UInt32 seed) { if (!Enum.IsDefined(typeof(MurmurHashEngine), engine)) { throw new InvalidEnumArgumentException("Invalid engine specified."); } switch (engine) { case MurmurHashEngine.x64: m_Engine = new Engine64(seed); break; case MurmurHashEngine.x86: m_Engine = new Engine86(seed); break; default: { if (Environment.Is64BitProcess) { m_Engine = new Engine64(seed); } else { m_Engine = new Engine86(seed); } break; } } }
protected MurmurHashG32(MurmurHashEngine engine, UInt32 seed) { switch (engine) { case MurmurHashEngine.X64: m_Engine = new EngineX64(seed); break; case MurmurHashEngine.X86: m_Engine = new EngineX86(seed); break; default: { if (Environment.Is64BitProcess) { m_Engine = new EngineX64(seed); } else { m_Engine = new EngineX86(seed); } break; } } }
protected MurmurHashG32(MurmurHashEngine engine, UInt32 seed) { if (!Enum.IsDefined(typeof(MurmurHashEngine), engine)) { throw new ArgumentException("Invalid engine specified.", nameof(engine)); } switch (engine) { case MurmurHashEngine.x64: m_Engine = new Engine64(seed); break; case MurmurHashEngine.x86: m_Engine = new Engine86(seed); break; default: { #if NETCOREAPP1_0 || NETCOREAPP1_1 if ((IntPtr.Size * 8) == 64) #else if (Environment.Is64BitProcess) #endif { m_Engine = new Engine64(seed); } else { m_Engine = new Engine86(seed); } break; } } }
public MurmurHash128(MurmurHashEngine engine, UInt32 seed) : base(engine, seed) { }
public MurmurHash128(MurmurHashEngine engine) : base(engine, 0u) { }