Implement various simple hash functions

Change-Id: I9b732d5ef3be5fc1aa618d541473f7de764bdbbc