Replace string with string hash.