(byte[] input)
| 327 | } |
| 328 | |
| 329 | private static byte[] CaseMurmurHash3(byte[] input) |
| 330 | { |
| 331 | if (input.Length == 32) |
| 332 | { |
| 333 | (ulong h1a, ulong h1b) = MurmurHash3.X64_128([1, 2, 8], 47); |
| 334 | (ulong h2a, ulong h2b) = MurmurHash3.X64_128(Encoding.UTF8.GetBytes("01234567890123456789"), 47); |
| 335 | ByteWriter writer = new(); |
| 336 | writer.WriteInt64(unchecked((long)h1a)); |
| 337 | writer.WriteInt64(unchecked((long)h1b)); |
| 338 | writer.WriteInt64(unchecked((long)h2a)); |
| 339 | writer.WriteInt64(unchecked((long)h2b)); |
| 340 | return writer.ToArray(); |
| 341 | } |
| 342 | |
| 343 | if (input.Length == 16) |
| 344 | { |
| 345 | ByteReader reader = new(input); |
| 346 | long h1 = reader.ReadInt64(); |
| 347 | long h2 = reader.ReadInt64(); |
| 348 | (ulong expected1, ulong expected2) = MurmurHash3.X64_128([1, 2, 8], 47); |
| 349 | Ensure(h1 == unchecked((long)expected1), "murmur hash h1 mismatch"); |
| 350 | Ensure(h2 == unchecked((long)expected2), "murmur hash h2 mismatch"); |
| 351 | return []; |
| 352 | } |
| 353 | |
| 354 | throw new InvalidOperationException($"unexpected murmur hash input length {input.Length}"); |
| 355 | } |
| 356 | |
| 357 | private static byte[] CaseStringSerializer(byte[] input) |
| 358 | { |
nothing calls this directly
no test coverage detected