Calculate and Compares Hash