ns_hash - Compute a numeric hash value from a string
This command takes an arbitrary value and computes from the value a numeric value (integer). It uses for hashing the Tcl hash function, such it does not have cryptograthic strength. This function is very weak against malicious strings; it is very easy to generate multiple keys that have the same hashcode. On the other hand, that hardly ever actually occurs. This function is very cheap and computes an integer value suitable as input for various functions.
The command is useful in combination of the modulo function e.g. for hash-based partitioning.
% ns_hash "hello world" 3255479292