diff --git a/src/Celerity.Hashing/StringFnV1AHasher.cs b/src/Celerity.Hashing/StringFnV1AHasher.cs index d7e9208..262d071 100644 --- a/src/Celerity.Hashing/StringFnV1AHasher.cs +++ b/src/Celerity.Hashing/StringFnV1AHasher.cs @@ -36,8 +36,9 @@ public int Hash(string key) uint hash = offsetBasis; foreach (char c in key) { - // Convert char to its lower byte; you may also want to consider - // encoding specifics if you deal with non-ASCII characters. + // Fold only the low byte of each UTF-16 code unit. Characters that share a + // low byte but differ in their high byte (i.e., U+0100 and above) collide here; use + // StringFnV1AFullHasher when that distinction matters. hash ^= (byte)(c & 0xFF); hash *= fnvPrime; }