name.GetHashCode ()
this is probably the best choice. This is a common problem with any form of hash that cannot be garenteed unique, but you can make it much more likely to be unique, allowing the hash to be longer.
You can also use different hashing algorithms in combination with each other to increase the supported range.
EDIT
Then you can create a custom hashcode function like
public static int GetHashCode (string value ) { int h = 0; for (int i = 0; i < value.Length; i ++) h += value [i] * 31 ^ value.Length - (i + 1); return h; }
(Stolen from another place)
Kurru
source share