Some tiny hash functions in javascript