I realize Summer '13 is just around the corner, but if you are still looking for a way to create a hashcode out of strings (or any other object) without hitting governor limits, here is a method I pieced together using the solution found here
private static final Long prime = 524287L;
public static Integer getHashCode(Object obj) {
String objHex = null;
if(obj instanceof Id) {
objHex = EncodingUtil.convertToHex(Blob.valueOf((String)obj));
} else if(obj != null) {
Blob objJSONBlob = Blob.valueOf(JSON.serialize(obj));
Blob objHMAC = Crypto.generateMac('hmacSHA1', objJSONBlob, Blob.valueOf('a key that does not matter'));
objHex = EncodingUtil.convertToHex(objHMAC);
}
if(objHex != null) {
Long hash = 0L;
for(String sChar : objHex.split('')){
if(String.isEmpty(sChar)) {
continue;
}
hash = ((hash ^ hexToInteger.get(sChar)) * prime);
}
return (Integer)hash;
} else {
return 0;
}
}