Beispiel #1
0
 public void FnvAltTest32(FNV32Basis basis, string test, uint check)
 {
     using var fnv = FowlerNollVo.CreateAlternate(basis);
     Assert.That(fnv.ComputeHash(Encoding.ASCII.GetBytes(test)), Is.EqualTo(BitConverter.GetBytes(check)));
     Assert.That(fnv.ComputeHashValue(Encoding.ASCII.GetBytes(test)), Is.EqualTo(check));
 }
Beispiel #2
0
 public static FNVAlgorithm <uint> Create(FNV32Basis basis = FNV32Basis.Default, uint prime = 0x01000193U) => new((uint)basis, prime);