Added a hash function

Change-Id: Ic85108cc2b0b23bb0b26e931a459687c9c9a5e77