[update] added hash function on client and server