setHash method.