port some hash functions
Merge pull request #70 from yeshunping/master

port some hash functions