Way, way too long ago I worked for a state DMV and they used something called the "Soundex Code" to hash surnames into 5-character alpha-num strings. Similar-sounding names cluster about the same hash values. U can find the algorithm on wiki.
Tadeusz Westawic An ounce of Clever is worth a pound of Experience.